AnsweredAssumed Answered

K22FX512 put in VLLS3 and weak-up

Question asked by Daniele Cortellazzi on Jun 29, 2017
Latest reply on Jul 10, 2017 by Jorge Antonio Alcala Vazquez

Hello,

 

i have a problem to put in VLLS3 my K22FX512. I use this function:

 

//enable llwu
NVIC_EnableIRQ(LLWU_IRQn);
LLWU_SetExternalWakeupPinMode(LLWU, 15, kLLWU_ExternalPinFallingEdge);
//vlls3
BOARD_Clock_VLLP();
SMC_PreEnterStopModes();
SMC_SetPowerModeVlls(SMC, &vlls_config);

 where BOARD_Clock_VLLP is set as:

 

 

my event llwu is:

 

 

void LLWU_IRQHandler(void)
{
uint32_t llwu_pin=0;

SMC_PostExitStopModes();
PMC_ClearPeriphIOIsolationFlag(PMC);
LLWU_GetExternalWakeupPinFlag(LLWU, llwu_pin);
if(llwu_pin == 15){
PORT_SetPinInterruptConfig(POWER_BUTTON_GPIO, POWER_BUTTON_PIN, kPORT_InterruptOrDMADisabled);
PORT_ClearPinsInterruptFlags(POWER_BUTTON_GPIO, (1U << POWER_BUTTON_PIN));
LLWU_ClearExternalWakeupPinFlag(LLWU, 15);
}
NVIC_ClearPendingIRQ(LLWU_IRQn);
NVIC_SystemReset();
}

 

but the system not weak-up or not entern in the vlls completely. My power consumption after the

SMC_SetPowerModeVlls(SMC, &vlls_config);

is 500uA (i have other peripherical that consume) so i think the cpu is vlls state.

 

Thanks!!

Outcomes