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

RTC problems on LPC2378

Hello,

I am using the keil mcb2300 development board witch the LCP2378 on it. I am trying to enable the RTC but it won't generate interrupts.

I have tried to use the alarm interrupt and the Counter Increment Interrupt. But both types of interrupts won't happen.

The clock tick counter is working but I noticed that the Consolidated Time Register wont't be updated. Does anyone know what the problem is?

void RTC_setup ()
{
PCONP |= 512;      //enable power to RTC


RTC_CCR = 0x13; /* Reset the clock ,clock from external osc,RTC enable*/
RTC_ILR =0x01; /* Clear the RTC Interrupt */
RTC_CCR =0x11; /* RTC reset changeed to 0 */
RTC_CIIR = 0x01; /*interrupt on Second counter*/
RTC_CISS = 0;
VICVectAddr13 = (unsigned long)RTC;/*Set Interrupt Vector*/
VICVectCntl13 = 15;
VICIntEnable = (1 << 13);

}

__irq void RTC(void)
{
        counter++;
        //FIO2SET =     RTC_ILR;
        // Reset interrupt flag
        RTC_ILR = RTC_ILR;
        VICVectAddr = 0;
 }