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

LPC2294 UART Interrupt problem

Hi All,
I recognized that I have an interrupt problem. I can't get into the vector both after receive or transmit. I checked all the initialized VIC registers I couldn'T find the error. Please help.

Here is the Init:

/*INIT*/
void serial_init (void) {
// PINSEL0 = 0x00050000; /* Enable RxD1 and TxD1 */ PINSEL0 |= 0x00000005; /// UART0 U0FCR=0x01; ///Enable FIFOS and reset U0LCR = 0x83; ///DLAB=1 U0DLL = 0x20; /// 115200 baud U0DLM = 0x00; U0LCR = 0x03; /// 8 bits, no Parity, 1 Stop bit ve DLAB=0 yapılıyor */ U0IER = 0x03; /// Enable RDA and THRE interrupts */ VICVectAddr14 = (U32)int_serial; /// 14th vector is serial interrupt VICVectCntl14 = 0x27; /// enable vect14 and assign IRQ number 7 VICIntEnable |= 0x80; /// IRQ 7 enable

Parents
  • I hope this will be more readable:

    void serial_init (void) { PINSEL0 |= 0x00000005; /// UART0 U0FCR=0x01; ///Enable FIFOS and reset U0LCR = 0x83; ///DLAB=1 U0DLL = 0x20; /// 115200 baud U0DLM = 0x00; U0LCR = 0x03; /// 8 bits, no Parity, 1 Stop bit ve DLAB=0 yapılıyor */ U0IER = 0x03; /// Enable RDA and THRE interrupts */ VICVectAddr14 = (U32)int_serial; /// 14th vector is serial interrupt VICVectCntl14 = 0x27; /// enable vect14 and assign IRQ number 7 VICIntEnable |= 0x80; /// IRQ 7 enable sendstop = 0; /* CtrlQ not received */ ridx = widx = 0; /* clear buffer indexes */
    }

Reply
  • I hope this will be more readable:

    void serial_init (void) { PINSEL0 |= 0x00000005; /// UART0 U0FCR=0x01; ///Enable FIFOS and reset U0LCR = 0x83; ///DLAB=1 U0DLL = 0x20; /// 115200 baud U0DLM = 0x00; U0LCR = 0x03; /// 8 bits, no Parity, 1 Stop bit ve DLAB=0 yapılıyor */ U0IER = 0x03; /// Enable RDA and THRE interrupts */ VICVectAddr14 = (U32)int_serial; /// 14th vector is serial interrupt VICVectCntl14 = 0x27; /// enable vect14 and assign IRQ number 7 VICIntEnable |= 0x80; /// IRQ 7 enable sendstop = 0; /* CtrlQ not received */ ridx = widx = 0; /* clear buffer indexes */
    }

Children