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 with external 32.768kHz oscillator on lpc2378

I'm trying to use the RTC on my MCB2300 with Keil IDE. The NXP example is only using the internal clock. My initialization seems to be ok, according to the lpc23xx manual. But I'm facing 2 issues.
First, my code is running only in debug mode. When not in debug mode, it seems that interrupt is never fired. In debug mode (even without breakpoint) interrupt behaviour is great but timing is really slow (1seconde every 4 or 5sec).
I'm powering RTC with PCONP register before initialization, then I set CCR register to use external oscillator. Then I set my interrupt and I
enable my RTC. I don't understand what I'm missing here.
Thanks for any help !

Parents
  • What does your RTCHandler() do?

    You said that your code doesn't work in normal mode.

    "When not in debug mode, it seems that interrupt is never fired."

    If the "Counter Increment Interrupt" is fired, what will you see?

    Could you please confirm that, in debug mode, you really get a "Counter Increment Interrupt" (RTCCIF)? not an "alarm registers generated interrupt" (RTCALF), neither a "Counter Increment Sub-Seconds interrupt" (RTSSF).

Reply
  • What does your RTCHandler() do?

    You said that your code doesn't work in normal mode.

    "When not in debug mode, it seems that interrupt is never fired."

    If the "Counter Increment Interrupt" is fired, what will you see?

    Could you please confirm that, in debug mode, you really get a "Counter Increment Interrupt" (RTCCIF)? not an "alarm registers generated interrupt" (RTCALF), neither a "Counter Increment Sub-Seconds interrupt" (RTSSF).

Children