S32K146 RUN<->VLPR power mode transitions

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

S32K146 RUN<->VLPR power mode transitions

Jump to solution
493 Views
john24
Contributor III

Using S32 SDK v3.0.0 RTM and S32 Design Studio for ARM v2.2.

By following the example project created from within the Design Studio, 'power_mode_switch_s32k146', in our own firmware project, the following sequence of API calls are used:

POWER_SYS_Init(...);

...

POWER_SYS_SetMode(RUN, POWER_MANAGER_POLICY_AGREEMENT);

...

POWER_SYS_SetMode(VLPR, POWER_MANAGER_POLICY_AGREEMENT);

 

The observation was: When the PEMicro debugger is used on our target board, to run our firmware with the Design Studio, the RUN<->VLPR power mode transitions work without problems, and the target board will alternate between the two power modes successfully per different amounts of current consumption in each mode, as measured by a O-scope. However, when the same firmware image has been programmed into the target board's Flash, then PEMicro debugger disconnected from the Jtag port and board power-cycled, the board appears to go from RUN to VLPR for the first time and then will be staying/stuck in the VLPR mode, and cannot come out of it (again, per the current consumption measured).

Any thoughts/suggestion would be great to have. Thanks!

Labels (1)
Tags (2)
0 Kudos
1 Solution
357 Views
john24
Contributor III

Thank you, Senlent, this issue was resolved. The issue came from function calls that will actually "stall" the code execution, when the NXP DS IDE/PEMicro debugger is not used.

Thanks again!

View solution in original post

0 Kudos
5 Replies
358 Views
john24
Contributor III

Thank you, Senlent, this issue was resolved. The issue came from function calls that will actually "stall" the code execution, when the NXP DS IDE/PEMicro debugger is not used.

Thanks again!

0 Kudos
425 Views
john24
Contributor III

Hi Senlent,

Thank you for the reply. In fact, I have just resolved the issue myself. It was due to function calls in code that can stall if not using the debugger.

So, to confirm: The SDK API call (available via the Power Manager component), POWER_SYS_SetMode(...), is indeed what we should use to enter/exit any of the S32K146 low power modes (VLPR/VLPS/STOP1/STOP2)?

Please advise. Thank you.

0 Kudos
417 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@john24

yes, the function "POWER_SYS_SetMode" also will be reinitialize the clock setting based on the current power mode you selected.

0 Kudos
461 Views
john24
Contributor III

Additional note: As an experiment, I leave the PEMicro Jtag debugger (powered up via USB) connected to our target board, and let the same firmware run from Flash. Still, once entering the VLPR mode from RUN mode for the first time, the target board continues to stay in the VLPR mode and "stuck" there, per the board's current consumption as measured by the O-scope.

0 Kudos
436 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@john24

please have a try the below methods.

Senlent_0-1706496621278.png

Senlent_1-1706496637145.png

 

0 Kudos