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 strange behaviour

Hi!

I had inicialize RTC and it's work fine. Than I tested some other example and then I flash again first program with RTC and didn't work.

I'm using MCB2300 with LPC2378.

My inicialization

void RTC_init()
{

   RTC_AMR      = 0;
   RTC_CIIR     = 0;
   RTC_CISS     = 0;

   RTC_CCR      = 0x00000010; // 32kHz osc
   RTC_PREINT   = PREINT_RTC; //0
   RTC_PREFRAC  = PREFRAC_RTC; //0

   RTC_CIIR |= 0x0001;  //sec irq
   VICVectAddr13 = (unsigned long)rtc_irq;

   VICVectCntl13 = 10; //priority

   VICIntEnable |= 1<<13;

   RTC_CCR|=0x00000001;     // RTC enable

}

It could be a problem, that at start of procesor the most of registers are not init - have old values and have to be set? I looked all registers, but I didnt find nothing.

Thanke for your help

Peter

0