Hi,
I’ve been working with the S32K358 and have referred to the S32K3XX low-power management example, which demonstrates sleep and wake-up functionality using GPIO. However, I haven’t been able to get it working as expected.
I suspect there may be issues with my configuration or implementation. I would greatly appreciate it if you could review my configuration and source files and let me know whether they are correct or if any changes are needed.
After several attempts, I’m still unable to achieve the desired result, so I’m reaching out for your guidance.
Please find my configuration and source files attached for your review.
IDE: S32DS 3.5.14
SW Version: 4.0
HW: S32K358
Best regards,
Karmegan C
Hi @karmegancjk,
When wake-up is detected and the S32K358 enters the reset sequence, is the RAM content volatile or non-volatile?
32KB of SRAM content is non-volatile, or rather, 32KB of SRAM is kept powered while on standby:
If RAM content needs to be non-volatile, how can I create standby RAM memory and copy RAM data to standby RAM memory?
In order to use standby RAM, you must modify the linker file, and assign the separate 32KB, place standby sections and adjust the linker address symbols. You must also initialize ECC of standby RAM if previous reset was POR.
I've sent you a private message with a presentation on how to use standby RAM, and low power in general.
Is standby mode similar to sleep mode or deep sleep mode in the S32K358 Cortex-M7?
Yes, standby mode is similar to deep sleep:
Best regards,
Julián
Hi Julián,
The S32K358 sleep and wake-up functionality through GPIO is working. When a rising edge is detected, the controller resets, as you mentioned, with a reset sequence. Now, I have a few doubts:
When wake-up is detected and the S32K358 enters the reset sequence, is the RAM content volatile or non-volatile?
If RAM content needs to be non-volatile, how can I create standby RAM memory and copy RAM data to standby RAM memory?
Is standby mode similar to sleep mode or deep sleep mode in the S32K358 Cortex-M7?
Hi @karmegancjk,
When entering STANDBY mode, I am using wake-up channel 46 (PTC24). My understanding is that if a rising edge is detected on this pin, a wake-up interrupt should be triggered.
The external wake-up signals support both rising or falling detection.
Does the program counter resume execution from address 0x00402000?
Or is a full MCU reset required to resume execution?
In previous devices (S32K1), code execution resumed after the WFI instruction, meaning Wakeup ISR → Code after WFI; S32K3 will always perform a reset sequence after waking up. This can depend on configured standby mode.
For example, normal standby exit performs the reset sequence, then initializes sBAF and HSE FW (if installed), then resumes execution at reset_handler.
However, fast standby exit can skip sBAF and HSE initialization and jump straight into a user defined boot address. After this user defined boot address, performing a full reset is recommended to fully initialize the device (or you can go back to standby again, depending on the application's needs):
As for the project configuration, everything seems to be fine.
Best regards,
Julián
Hi,
I have some doubts regarding the behavior of the MCU when entering STANDBY mode (sleep or deep sleep modes). Does the program counter freeze during this mode and restart from the vector address 0x00402000 after wake-up, or does it resume execution from where it left off?
Could you please check whether my Power and Wake-Up driver configuration (in the .cfg file) is correct? I’ve attached the configuration file from my project for your reference.
Hi @karmegancjk,
Are you using the S32K3X8EVB, or is this custom hardware?
Keep in mind that S32K358 has an added step for standby exit with the PMIC handshake. If you don't use the handshake, set PMIC_PGOOD_HNDSHK_BYP bit in DCMRWF1: Solved: S32K3: Request for Support on Wakeup and Reset Behavior - NXP Community.
Also, which GPIO are you configuring? Please cross-check if the WKPU signal is correct with the S32K358_IOMUX.xlsx file attached to the S32K3 reference manual.
Best regards,
Julián