VLPS wakeup issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

VLPS wakeup issue

844件の閲覧回数
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 件の賞賛
返信
1 返信

827件の閲覧回数
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 件の賞賛
返信