This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART interrupt problem

Hi,

I have written code which has UART0 setup to interrupt on THRE and RDA events, however when I get an interrupt the value of U0IIR is 0xC1 which makes no sense.

If I set a break point on the irq the U0IIR is 0x81 when you hover over it and 0x82 in it's memory window. 0x82 is the value that I expect but even the memory window goes to 0x81 when I single step.

The processor is a LPC2294 I've checked the Philips errata and there is no mention of a problem.

I am using the ARTX and ANET below is my setup code:

void serial_init (void) {

IODIR0 = 0x00000100; // P0.8 defined as Output
PINSEL0 = 0x00000005; // Enable RxD0 and TxD0
U0LCR = 0x83; // 8 bits, no Parity, 1 Stop bit
U0DLL = 49; // 19200 Baud @ 15MHz VPB Clock
U0LCR = 0x03; // DLAB = 0
U0FCR = 0x81; // Enable fifo and its Rx int trigger to 8

U0IER = 0x03; // Enable RDA and THRE interrupts only
VICVectAddr14 = (U32)int_serial; // Set int vector slot to serial handle function
VICVectCntl14 = 0x26; // Enable and set source to USART 0
VICIntEnable |= 0x40; // Enable vector to interrupt
}



Does anyone have any idea what I am doing wrong.

Thanks,

Ian Mellor