S32K3 Standby mode

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

S32K3 Standby mode

Jump to solution
5,056 Views
kjy106906
Contributor IV

Hello I have questions about the S32K3 STANDBY MODE.

  1. Operating Mode STANDBY cannot reduce current consumption.
    Operating Mode SOC_PREPARE_STANDBY -> SOC_STANDBY reduces current consumption.
    What is the difference between these two behaviors?
  2. When I entered STANDBY MODE of S32K3, the connection with Trace32 was lost.
    This is a different behavior than the S32K1.
    Is there a setting to prevent disconnection from Trace32?

Thank you!!

 

0 Kudos
Reply
1 Solution
4,917 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi@kjy106906,

If you look at the Power_Ip_SetMode() function in Power_Ip.c, there are 8 steps.

The power mode is specified not only by ModeConfigPtr->PowerMode but ModeConfigPtr->McMeModeConfigPtr too.

 

Regards,

Daniel

 

View solution in original post

0 Kudos
Reply
9 Replies
540 Views
AbdNxp
Contributor I

Hi, Any one please help me with low power S32K3xx.

 

MCU seem to be going in low power mode, but at wakeup as soon as taskEXIT_CRITICAL is executed the control jumps to hardfault.

Below are the steps I am following from a freeRTOS Task:-
 
// Enter critical section to prevent task switches
taskENTER_CRITICAL();
 
// Ensure all previous data operations are complete
MCAL_DATA_SYNC_BARRIER();
 
// Set the RTC alarm for the low power wakeup callback
RTCSetAlarm(10, lowPowerWakeUpCallback);
 
// Suspend all tasks to ensure safe transition
vTaskSuspendAll();
 
// Set the device to low power mode
 
 
Power_Ip_SetMode(&lowPowerConfig[0]);
 
// Ensure that all previous operations are completed before further instructions
MCAL_DATA_SYNC_BARRIER();
 
// Ensure the instruction pipeline is flushed to account for any configuration changes
MCAL_INSTRUCTION_SYNC_BARRIER();
 
Clock_Ip_InitClock(&Clock_Ip_aClockConfig[0]);
// Resume all tasks after low power mode transition
xTaskResumeAll();
 
 
// Exit the critical section
taskEXIT_CRITICAL();
0 Kudos
Reply
5,043 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kjy106906,

Can you please elaborate on the first question?

What drivers/tools do you use?

 

Regarding the second question, it has been answered by Lauterbach here:

https://community.nxp.com/t5/S32K/How-to-re-connect-Lauterbach-debugger-to-S32K344-after-standby/td-...

 

BR, Daniel

 

0 Kudos
Reply
5,035 Views
kjy106906
Contributor IV

Thanks for the reply!


1. S32K312 MCU, controlling with Power_Ip_SetMode.
2. But looking at the answer, the question was not resolved.
Any additional solutions related to this?

 

Best Regards

Junyeong

0 Kudos
Reply
5,022 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @kjy106906,

1.

You can refer to the RTD documentation

danielmartynek_0-1652955908487.png

RTD_MCU_UM.pdf

Section 3.6.5 How Mcu_SetMode works when entering Low Power mode

I would say, it depends on how the modes are configured.

As the UM says, "The sequence can also be split, giving the posibility to run application code in between the steps"

You can call:

Power_Ip_SetMode(&Power_Ip_aModeConfigPB[1]);/*Enter SOC_PREPARE_STANDBY mode, close the last mile regulator*/
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[2]);/*Enter SOC_STANDBY mode*/

 

2.

Please refer to the S32K3 RM, 76.9 Low-power debug handshake protocol.

If the debugger wants to perform low power entry handshake, then the debugger writes a bit in the LWPWREN to indicate that it wants the low power handshake with the device.
Before entry, it can save its configurations and write a bit in the PRVNTRSTRGM to allow the device to enter standby. While entering in standby mode, debugger connection is lost.
On standby exit, the debugger connection is restored. Since the debugger is already aware that it has enabled the low power debug handshake, the debugger has to poll reading the DESTRST bit to check if the debug infrastructure is out of reset and DAP connection connection can be established now. To take the device out of reset on standby exit, the debugger needs to configure
WTRSTRGM bit. After this bit is set by the debugger, the device enters the RUN mode.

Contact Lauterbach support for more details about this implementation.

 

Regards,

Daniel

 

 

0 Kudos
Reply
4,986 Views
kjy106906
Contributor IV

Thanks for the reply @danielmartynek 

But I still have a question.

Looking at the documentation, STANDBY and SOC_PREPARE_STANDBY->SOC_STANDBY are the same and it says 'giving the posibility to run application code in between the steps'.
However, when tested, the current consumption does not decrease when proceeding to STANDBY.
(SOC_PREPARE_STANDBY->SOC_STANDBY reduces current consumption)
Can i know the cause?

0 Kudos
Reply
4,976 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @kjy106906,

The documentation seems to be really incomplete.

 

Once you have the modes configured in the configuration GUI and the code has been generated, please have a look at generated struct in Power_Ip_BOARD_InitPeripherals_PBcfg.c

Power_Ip_aModeConfigPB[]

 

And then take a look at the Power_Ip.c source code.

Function Power_Ip_SetMode() which takes the struct as an argument.

As you can see below, POWER_IP_STANDBY_MODE does both.

But you can call the prepare mode separately as specified in the documentation.

danielmartynek_0-1653384887566.png

 

BR, Daniel

0 Kudos
Reply
4,962 Views
kjy106906
Contributor IV

Thanks for the reply @danielmartynek 

Looking at the documentation, STANDBY and Prepare SOC STANDBY -> SOC STANDBY seem to be the same thing.
However, when STANDBY is performed, current consumption does not decrease.
Can you tell me why?

Best Regards

0 Kudos
Reply
4,918 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi@kjy106906,

If you look at the Power_Ip_SetMode() function in Power_Ip.c, there are 8 steps.

The power mode is specified not only by ModeConfigPtr->PowerMode but ModeConfigPtr->McMeModeConfigPtr too.

 

Regards,

Daniel

 

0 Kudos
Reply
3,071 Views
GiangHM
Contributor I

Hi I have issue :  I call Mcu_setmode to chang mode  from Run -> SOC_PREPARE_STANDBY_MODE -> SOC_STANDBY_MODE  after  about 60s I see current consumption reduce. I think 60s is too long.

0 Kudos
Reply