VLPS wakeup issue

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

VLPS wakeup issue

1,036 Views
sungjun
Contributor II

I am developing through S32k144 device.
The MCU enters VLPS mode and wakes up through GPIO interrupt.
Currently, when VLPS is completed and Wakeup is performed, Power_init and Clock_init are performed.

The problem comes from Power init.

sungjun_0-1675313602216.pngsungjun_1-1675313645614.png

 

DEV_ASSERT((CLOCK_SYS_GetFircFreq() != 0U) || (sysClkConfig->src != FIRC_CLK));
I can't get out of the above statement.

After checking the problem, it seems that the problem is caused by the FIRC of FIRCCSR being disabled.

The question here is the setup order after VLPS wakeup.
1. POWER_SYS_Init - POWER_SYS_SetMode - CLOCK_SYS_Init - CLOCK_SYS_SetConfiguration
2. CLOCK_SYS_Init - CLOCK_SYS_SetConfiguration - POWER_SYS_Init - POWER_SYS_SetMode
3. don't care

In which order should I set it 1, 2, 3?

0 Kudos
Reply
1 Reply

1,019 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@sungjun

You don't have to use POWER_SYS_Init or Clock_Init after waked up from the low-power mode,only POWER_SYS_SetMode will be fine.

you can take a look at the AN5425,the chapter 5.4 VLPR mode exit.

I attched it for your reference.(VLPR to run should be same with VLPS.)

To reenter normal RUN mode, clear SMC_PMCTRL[RUNM] bits. If a higher execution frequency is desired, poll PMSTAT until it is set to RUN and then configure SCG module as desired. Also, a reset event causes the MCU to come back to RUN mode.
Next snippet code shows a basic VLPR to RUN transition function.

void VLPR_to_RUN (void)
{
/* Check if current mode is VLPR mode */
if(SMC->PMSTAT == 0x04)
{
/* Move to RUN Mode*/
SMC->PMCTRL = SMC_PMCTRL_RUNM(0b00);
/* Wait for Transition*/
while(SMC->PMSTAT != 0x01);
}
}

BR!

0 Kudos
Reply