Can't enter VLPS mode inFreeRTOS by using S32SDK_S32K14x_RTM_2.0.0.

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

Can't enter VLPS mode inFreeRTOS by using S32SDK_S32K14x_RTM_2.0.0.

956 Views
zwxdlut
Contributor I

Hello,

I am working on S32K144 in FreeRTOS, using SDK S32SDK_S32K14x_RTM_2.0.0.

I try to enter VLPS mode by calling POWER_SYS_SetMode.

Before start task scheduler, it works. But during tasks running, calling POWER_SYS_SetMode immediately returns  success (STATUS_SUCCESS) without any interrupt trigger. System can't enter VLPS Mode.

Code segment as follow:

/* A timer callback function */

void prv_on_timer( TimerHandle_t xTimer )

{

   ............

   /* Shut down modules */

   ................

   /* Enter VLPS mode */

   POWER_SYS_SetMode(VLPS, POWER_MANAGER_POLICY_AGREEMENT);

   /* Setup modules */

   ................

}

I can achieve my purpose by operatiing registers SMC, which way I don't like...

This issue can be easily recurrent on S32K144-EVB.

When I use S32SDK_S32K14x_EAR_0.8.6,everything is OK, so I guess there has bug in power manager module of S32SDK_S32K14x_RTM_2.0.0.

Is there anyone encountering the same problem? Or is there something wrong of the way in which I use it ?

Thank you very much!

Labels (1)
0 Kudos
2 Replies

767 Views
prasanna_rawke
Contributor II

Hello Wenxing and Jorge Antonio,

I had the same issue in the first go even with the latest SDK (RTM_3.0.0). 

On the other hand, I found a simple solution of it. Running the enter to sleep routine as a critical section, ensuring no other background interrupts / processes can intervene the enter sleep routine.

vPortEnterCritical();

POWER_SYS_SetMode(VLPS, POWER_MANAGER_POLICY_AGREEMENT);

vPortExitCritical()

Regards,

Prasanna

0 Kudos

767 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Wenxing Zhang

Sorry for the late reply. Could you tried with our latest SDK (RTM_3.0.0)? I don't see any issue with the call that you used, could you share the project that you are using?

Please remember that in stop mode any interrupt can wake up the MCU, so be sure that there isn't any timer inteerupt.


Have a great day,
TIC

0 Kudos