youssef chabaane

Wake-up from VLPS

Discussion created by youssef chabaane on Nov 17, 2017
Latest reply on Nov 20, 2017 by youssef chabaane

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

Outcomes