UART transmitting interrupt handler

Hello

I am facing a problem in the following code.

code :-

#include "LPC318x.h"
void IRQ_HANDLER(void) __irq
{ PIO_OUTP_SET = 0x7EFFFFFF; PIO_OUTP_SET = 0x7EFFFFFF;
}

int main (void)
{ unsigned int i=0; SYSCLK_CTRL = 0x00000140; HCLKPLL_CTRL = 0x00014024; UARTCLK_CTRL = 0x0F; MIC_ER = 0x000007C0; U5LCR = 0x03; U5CLK = 0x0000020E; UART_CLKMODE = 0x00000550; U5FCR = 0x00; U5IER = 0x07; U3DLL = 27;

while(1) {

U5THR = 0x55; U5THR = 0xAA; }

}

When i enable UART5 interrupt by using MIC_ER interrupt is generated as it should be. But after transmitting the data it jumps to an unusual location
0x000002d4.
But it doesnt go to IRQ handler.
If i don't enable the interrupt using MIC_ER then it executes only while(1) loop.
The main aim of the program is to blink the LED after send data through UART5 as mentioned in the IRQ interrupt handler.

Thank You,

Ankit Thakkar.

Parents
  • hello

    I checked again. It was my fault.
    It enters into interrupt mode as the interrupt is generated but it doesn't find any interrupt handler at the location. I checked in the map file that IRQ_Handler is assigned an address in the memory map.
    As it doesnt find any IRQ handler it goes into ABORT mode.
    I need to add IRQ handler at the location assigned to IRQ_Handler in the map file.
    But i dont know how to add that IRQ handler.
    Let me know if any body familiar with this kind of problem.

    Regards,

    Ankit thakkar.

Reply
  • hello

    I checked again. It was my fault.
    It enters into interrupt mode as the interrupt is generated but it doesn't find any interrupt handler at the location. I checked in the map file that IRQ_Handler is assigned an address in the memory map.
    As it doesnt find any IRQ handler it goes into ABORT mode.
    I need to add IRQ handler at the location assigned to IRQ_Handler in the map file.
    But i dont know how to add that IRQ handler.
    Let me know if any body familiar with this kind of problem.

    Regards,

    Ankit thakkar.

Children
More questions in this forum