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

Unable to write into UART1 Interrupt Enable Register of NXP's LPC2368

Hi, I am having a problem in enabling the interrupts for UART1 in LPC2368.
Program is getting stucked at the point where I am writing value to the UART1 Interrupt Enable Register.

U1IER = 0x07;  /*Enable RDA, THRE and RLS Interrupts*/


I tried to print value of U1IER, but nothing gets printed.
U1IER and U1DLM shares same address i.e. 0xE0010004. Hence I tried to read/write this address directly, still got nothing. When I initialized UART1 with

void UART1_Init(void)
{

/* RxD1 and TxD1 */
        printf("In UART1 initialization\n");
    PINSEL0 |= 0x40000000;  /* Enable TxD1 P0.15 */
    PINSEL1 |= 0x00000001;      /* Enable RxD1 P0.16 */
/*      U1LCR: UART1 Line Control Register
        0x83: enable Divisor Latch access, set 8-bit word length,
        1 stop bit, no parity, disable break transmission               */
        U1LCR = 0x83;
/*      U1DLM: UART1 Divisor Latch (MSB)        */              //baudrate = 9600
        U1DLM = DIVISOR1/256;
        printf("U1DLM = %X \n",U1DLM);                //This is just for checking value of U1DLM.
                                                                                //Here nothing gets printed but program executes after this
/*      U1DLL: UART1 Divisor Latch (LSB)        */
        U1DLL = DIVISOR1%256;
/*      U1LCR: UART1 Line Control Register
        0x03: same as above, but disable Divisor Latch access   */
        U1LCR = 0x03 ;
/*      U1FCR: UART1 FIFO Control Register
        0x07: Clear Tx FIFO and enable Rx and Tx FIFOs          */
        U1FCR = 0x07 ;          //0x07 : Rx Trigger level 1 byte, FIFO Enable, Tx FIFO Reset, Rx FIFO Reset

        U1IER = IER_RBR | IER_THRE | IER_RLS;   /*Enable UART1 interrupt */
        //here program gets stucked.
}


I tried last statement at various places like inside initialization as well as after initialization in main function.
What could be the problem?

Thanks.

0