Wake-up from VLPS

cancel
Showing results for 
Search instead for 
Did you mean: 

Wake-up from VLPS

764 Views
Contributor II

Hi,

Once entering in VLPS mode, an interrupt external input can not wake up MCU.

The PTC12 is configured as GPIO input and rising edge interrupt is enabled on it.

I configure an interrupt handler to just clear the ISF bit.

I use this code to enter in VLPS:

SMC->PMPROT |= SMC_PMPROT_AVLP(1);
/* Select VLPS mode */
SMC->PMCTRL = SMC_PMCTRL_STOPM(0b010);
/*wait for write to complete to SMC before stopping core */
dummyread = SMC->PMCTRL;
dummyread++;
/* Enable SLEEPDEEP bit in the core */
S32_SCB->SCR |= S32_SCB_SCR_SLEEPDEEP_MASK;
/* Waiting for next interrupt will get micro in sleep mode */
STANDBY();

The GPIO interrupt is tested and working correctelly before the MCU goes to VLPS.

So why can not wake up from VLPS? M I missing something?

Thanks,

Youssef

0 Kudos
1 Reply

119 Views
Contributor II

Finally, I found the issue. Actually, the MCU was never gone to VLPS. Instead watchdog was enabled in stop mode what is causing problems and cut supply. It is is normal that after that the MCU could not be waked up. When disabling watchdog in stop mode, every thing is working well.