my board used LPTMR and PTC3 wakeup the LLWU mode on VLPS,
LPTMR able wakeup,
PTC3 can't wakeup,
What causes it?
init code:
llwu_external_pin_filter_mode_t filterMode;
pin_config.pinDirection = kGPIO_DigitalInput;
pin_config.outputLogic = 0;
// MCU wakeup pin
GPIO_PinInit(GPIOC, 3, &pin_config);
/* Setup LPTMR. */
LPTMR_GetDefaultConfig(&lptmrConfig);
lptmrConfig.prescalerClockSource = kLPTMR_PrescalerClock_1; /* Use LPO as clock source. */
lptmrConfig.bypassPrescaler = true;
lptmrConfig.enableFreeRunning = true;
LPTMR_Init(LPTMR0, &lptmrConfig);
LPTMR_EnableInterrupts(LPTMR0, kLPTMR_TimerInterruptEnable);
LLWU_EnableInternalModuleInterruptWakup(LLWU, 0, true);
// setup external PTC3 pin
LLWU_SetExternalWakeupPinMode(LLWU, 7, kLLWU_ExternalPinAnyEdge);
NVIC_EnableIRQ(LLWU_IRQn);
NVIC_EnableIRQ(LPTMR0_IRQn);
......
sleep ongo:
LPTMR_SetTimerPeriod(LPTMR0, 60000);
LPTMR_StartTimer(LPTMR0);
LLWU_SetExternalWakeupPinMode(LLWU, 7, kLLWU_ExternalPinAnyEdge);
SMC_SetPowerModeVlps(SMC);
Hi genius gogo
If you want to set LLS mode you could check the following doc:https://community.nxp.com/docs/DOC-332687
Here is an example of how to set and use this mode in a FRDM-KL26Z.
Hope this could help
Regards
Jorge Alcala
Hi
The LLUW can't be used to wake the processor from VLPS (very low power STOP) because this mode is not a Low Leakage Mode (from LLS), meaning that the LLWU is not active when you set the VLPS mode.
To wake from VLPS you need an asynchronous interrupt. You can wake if you set LLS, for example.
http://www.utasker.com/kinetis/LLWU.html
Regards
Mark