AnsweredAssumed Answered

K60 wake up from VLLS3 mode through RTC failed

Question asked by Karthik Suryadevara on Jul 2, 2012
Latest reply on Jul 17, 2012 by EARL GOODRICH

Hello there,

I configured RTC timer to generate interrupts every one second.Also.RTC is configured to use LLWU module to wake up K60 from sleep deep mode.I put the K60 module to VLLS3 deep sleep mode.I find that K60 does not wake up from VLLS3 mode.


Unable to attach the files:


Here is the code for RTC initialization:


void rsi_mcu_rtc_init(uint32 time_in_seconds)
    uint32 i;
    rsi_sleep_time_in_seconds = time_in_seconds;
    /* Enable clock to LLWU module */
    /* Enable the clock to SRTC module register space*/
    /* Configure RTC as a wake up source through LLWU module */
    /*Only VBAT_POR has an effect on the SRTC, RESET to the part does not, so you must manually reset the SRTC to make sure everything is in a known state*/
    /*clear the software reset bit*/
    /* Enable RTC interrupt in NVIC */
    /* Enable low leakage wake up interrupt */
    /*Enable the oscillator*/
    /*Wait to all the 32 kHz to stabilize, refer to the crystal startup time in the crystal datasheet*/
    /* Set seconds register */
    RTC_TSR = (time_in_seconds);
    /* Set alarm register */

    /* Enable the counter */

void rsi_rtctimer_ISR(void)
     if((RTC_SR & RTC_SR_TIF_MASK)== 0x01)
//         printf("SRTC time invalid interrupt entered...\r\n");
         RTC_SR &= 0x07;  //clear TCE, or RTC_TSR can  not be written
         RTC_TSR = 0x00000000;  //clear TIF
     else if((RTC_SR & RTC_SR_TOF_MASK) == 0x02)
//         printf("SRTC time overflow interrupt entered...\r\n");
         RTC_SR &= 0x07;  //clear TCE, or RTC_TSR can  not be written
         RTC_TSR = 0x00000000;  //clear TOF
     else if((RTC_SR & RTC_SR_TAF_MASK) == 0x04)
//         printf("SRTC time alarm interrupt entered...\r\n");
         RTC_TAR += 1;// Write new alarm value, to generate an alarm every second add 1
//         printf("No valid Flag was set!\n");


Here is the code for VLLS3 configuration :


void enter_vlls3(void)

    /* Write to PMPROT to allow VLLS3 power modes */
    /* Set the LPLLSM field to 0b101 for VLLS3 mode  */
    MC_PMCTRL = MC_PMCTRL_LPLLSM(5);           // set LPLLSM = 0b101
    /* Disable PORT modules */
   // printf("Entering VLLS3 power save mode\n");
    /* Now execute the stop instruction to go into VLLS3 */


void stop(void)

    /* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */

    /* WFI instruction will start entry into STOP mode */




The K60 module used is MK60DN512Z10 (Rev 1.4) with 4N30D - MASK

Appreciate any help to debug this issue.