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 !
Well, I finally find my problem : it comes from the hardware. The crystal on my MCB2300 seems to be broken. I should have check it before but the behaviour in debug mode had confused me (crazy behaviour that made a clock without external oscillator)! Moreover, I used to trust keil's hardware. Anyway, it's working now and I understand what was going on, so that's the point ! Thanks again John.
" ... behaviour in debug mode had confused me (crazy behaviour that made a clock without external oscillator)!"
Are you sure it was just debug mode, and not the Simulator...?
No, I've just checked again. I used ULINK ARM Debugger... It seems that the RTC was using the main clock and not the external oscillator. It's so weird but I've lost enough time to investigate it.