Sleep mode in S32k118 and configure wakeup sources

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

Sleep mode in S32k118 and configure wakeup sources

68 Views
Arunpk
Contributor I

 

I am trying to put the S32K118 into sleep mode (VLPR or VLPS) to reduce current consumption. For this, I have configured two clock structures—one for RUN mode and another for VLPR mode. Additionally, I have disabled all peripherals except PORT A and PORT D in the .MEX file for VLPR mode.

Expected Output: Current should be reduced to below 1–2mA.
Actual Output: Current is not reduced.

I need assistance in achieving microampere-level current consumption in sleep mode. Please provide the correct code sequence to configure the S32K118 from RUN mode to sleep mode. I have already tested an example project :power_mode_switch_s32k118:, which reduced the current to 6mA.

Additionally, I need to configure a wakeup source to wake up the MCU from sleep mode. In S32K344, there is a dedicated WKPU driver available for configuring the wakeup source. However, in S32K118, as per my understanding, there is no separate driver for wakeup configuration.

Please help me resolve these two issues as soon as possible.

Thank you!

0 Kudos
Reply
1 Reply

42 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Arunpk,

Please check the clock bias disable bit. CLKBIASDIS must be enabled during VLPS always to achieve the datasheet current. 

Julin_AragnM_0-1743198245931.png

Yes, the K3 goes through a system reset after the wakeup unit (WKPU) detects an interrupt. On the other hand, the K1 family simply goes through the Wakeup ISR → Code after WFI. Switching to RUN/VLPR mode directly after waking up from low power mode (VLPS).

For wakeup, simply configure ISR for dedicated wakeup pin. In the power_mode_switch example, you can see the interrupt service routine for SW3 declared as ButtonISR.

Best regards,
Julián

0 Kudos
Reply