K82 : wakeup from LLS3 mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K82 : wakeup from LLS3 mode

357 Views
EugeneHiihtaja
Senior Contributor I

Hello !

When MCU wake up from LLS3 mode , some LLWU interrupts should be cleaned as it mentioned in example.

But what about waiting some time for clock stabilisation ?

power_user_config_t targetConfig;
targetConfig.enableLpoClock = true;
targetConfig.mode = kAPP_PowerModeLls;
PM_PowerModeSwitch(&targetConfig, NULL);
//
// ... LLS3 ....
//
// Wakeup -> continue execution
//
// LLS3 –> RUN — 6.3 μs, see specification for exact clocks and etc.
//

/* Wait for PLL lock. MCG in PEE mode in RUN. */
while (!(kMCG_Pll0LockFlag & CLOCK_GetStatusFlags()))
{
}
CLOCK_SetPeeMode();

/* Power mode change. */
SMC_SetPowerModeRun(SMC); // No need ?
while (kSMC_PowerStateRun != SMC_GetPowerModeState(SMC))
{
}

Does this red color part is right one ?

Regards,

Eugene

0 Kudos
1 Reply

270 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Eugene,

If previous mode is VLPR and you want going to RUN mode, you should call this function. Otherwise, this function have no impact to system.

Regards,

Jing

0 Kudos