Wake-up from VLPS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Wake-up from VLPS

1,644 次查看
youssef
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 项奖励
回复
1 回复

999 次查看
youssef
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.