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

Problem with UART interrupt in LPC2387

Im Using LPC2387 in KEIL Uvision V4.14.4.0 Im trying to wite a program for UART0 with an interrupt, But its not entering into the ISR routine... I dont know whats the Problem is?? So please guide me how to overcome this. Without Interrupt Im able to Transmit the message....
Clock Source is Main Oscillator( Freq is 10Mhz)
Peripheral Clock Freq is 15Mhz
And The Baudrate im setting is 115200, and im using fractional baudrate register

#include <LPC23xx.H>

void pll(void);
void Transmit(unsigned char ch);
void Initialise_Uart0(void);
void Configure_UART0_Baudrate(void);
void ISR_Uart0(void) __irq;

int main()
{
        //unsigned char *str = "UART0 Serial Test";
        pll();
        Initialise_Uart0();
        while(1);
}

void Initialise_Uart0(void)
{

        PCONP |= (1 << 3) ; // 4 th bit

        PINSEL0 |= 0x00000050;
        //VICIntEnClr = 0xFFFFFFFF;
        Configure_UART0_Baudrate( );
        U0FCR = 0xC7;           // for rx fifo characters
        U0TER = 0x80;           // enable the transmit enable register
        VICIntSelect |= (1 << 6);
        VICVectAddr6 = (unsigned int)ISR_Uart0;
        VICVectPriority6 = 0x06;
        VICIntEnable |= (1 << 6);
        U0IER |= 0x07;       // Enable Receive, Transmit and Line Status interrupts
}

void Configure_UART0_Baudrate( void )
{
        while( !(U0LSR & 0x40) );

        U0IER &= ~0x07;             // Disable Receive, Transmit and Line Status

        U0LCR = 0x80;   /* Enable DLAB bit */
        U0DLM = 0;
        U0DLL = 5;
        U0FDR = ((0x08 << 4) | 0x05);
        U0LCR = 0x03;
        U0IER |= 0x07;  // Enable Receive, Transmit and Line Status interrupts
}


void ISR_Uart0(void) __irq
{
        unsigned char *str = "With Interrupt";
        while(*str)
        {
                Transmit(++*str);
        }
        VICVectAddr = 0;
}


void Transmit(unsigned char ch)
{
        while( !(U0LSR & 0x20));
        U0THR = ch;
}

void pll(void)
{
        SCS = (0x00000001 << 5);          //Enable Main Oscillator
        SCS |= 0x00000020;                              //Select the main Oscillator range
        PLLCON &= ~0x01;                            //Disconnect the PLL
        PLLFEED = 0xAA;
        PLLFEED = 0x55;
        PLLCON &= ~0x01;                            //Disable the PLL
        PLLFEED = 0xAA;
        PLLFEED = 0x55;                                 //Write feed sequence
        while(!(SCS & 0x00000040));         //Wait untill Main Oscillator is stable
        CLKSRCSEL = 0x00000001;                 //Select Main Oscillator as PLL Imput
        PLLCFG = (0x0000017|0x00000000);     //Write PLL Multipiler and Divider values
        PLLFEED = 0xAA;
        PLLFEED = 0x55;                                 //Write Feed Sequence
        PLLCON = 0x01;                                  //Enable PLL
        PLLFEED = 0xAA;
        PLLFEED = 0x55;                                 //Wriete Feed Sequence
        USBCLKCFG = 0x00000009;                 //Write USBSEL Divider value
        CCLKCFG = 0x0000001F;                   //Write CPU Divider Value
        while(PLLSTAT & 0x000);                     //Wait PLL for Lock
        PLLCON |= 0x02;                                 //Connect the PLL
        PLLFEED = 0xAA;
        PLLFEED = 0x55;                                 //Write Feed Sequence
        PCLKSEL0 = 0x55555555;          /* PCLK is the same as CCLK */
        PCLKSEL1 = 0x55555555;
}

0