Hi Jing !
1.
I'm not using DSPI,USB, DMA for sure. Even all DMAs disabled by AIPS. MCU in RUN mode when enter to routine what prepare MCU for LLS3 mode.
2.
LPUART1 is used for traces and interrupt driven input ( terminal ).
Output is always flushed :
while (
!(kLPUART_TransmissionCompleteFlag & LPUART_GetStatusFlags((LPUART_Type *) DEBUG_UART)))
{
}
3. I2C slave is active but no transmission for sure. I2C master is active ( poll sensor periodically) but no transaction becouse MCU in other task
what used for execute LLS3 entry routine.
4. A lot of external GPIOs are active in interrupt mode and when I enter to LLS3 mode I have enabled all of them as LLWU wakeup sources.
6.
LPTIMER is also used as source ( and regular interrupts as well ) of wakeup and timer is always active ( 10 s wakeup loop for testing ).
Moment for entry can much with end of timer
6.
Have it sense to disable peripheral interrupts and GPIO interrupts before LLS3 and enable those when resume back ?
7.
Have it sense to clean LLWU by LLWU_ClearExternalWakeupPinFlag and GPIO events by PORT_ClearPinsInterruptFlags() ?
8.
How freely I can manipulate with LLWU_IRQ ?
I enable it when all sources is configured
/* All wake up sources are configured. */
EnableIRQ(LLWU_IRQn);
// Enter to LLS3
power_user_config_t targetConfig;
targetConfig.enableLpoClock = true;
targetConfig.mode = kAPP_PowerModeLls;
PM_PowerModeSwitch(&targetConfig, NULL);
....
//Resumed
DisableIRQ(LLWU_IRQn); // Disable
9. Can MPU have some effect ?
10. List if reasons look dangerous.
Does it possible to disable this type of reset and have routine what put MCU again to LLS3 if first trial are not succesfull ?
Regards,
Eugene