Hello there,
Unable to attach the files:
Here is the code for RTC initialization:
void rsi_mcu_rtc_init(uint32 time_in_seconds)
Here is the code for VLLS3 configuration :
void enter_vlls3(void)
The K60 module used is MK60DN512Z10 (Rev 1.4) with 4N30D - MASK
|
Check a recent K60xxxRM document on RTC, and the new Interrupt Enable Register -- you may need to set this:
if ((SIM_SDID & SIM_SDID_REVID_MASK) != 0) // Only for Rev 1.1 and higher silicon
{
// Make sure RTC interrupts are enabled, since these may have been disabled at some
// point, and the register is battery backed. No need for this on the 1.0 silicon,
// since this register served a different purpose (flash swap) in that rev.
rtc->IER = (RTC_IER_TIIE_MASK | RTC_IER_TOIE_MASK | RTC_IER_TAIE_MASK);
}
Also, it seems to me you need to set TAR to at least 1 more than TSR to get that first interrupt.