Example S32K144 RTC VLPS

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

Example S32K144 RTC VLPS

Example S32K144 RTC VLPS

Detailed Description:
This example shows use of RTC in VLPS mode.
The MCU is put into the VLPS mode (Sleep-On-Exit).

RTC alarm interrupt brings it to VLPR every 3s and toggles BLUE LED (PTD0).
Since it works in the Sleep-On-Exit mode, after the ISR, the MCU goes to VLPS again without calling the WFI instruction.
When BTN0 (S32K144 EVB) is pressed, the power mode switch from VLPS to VLPR and other way round.
Interrupt is triggered on rising edge (PTC12), filtered by digital filter (clocked from LPO).
In VLPR, RTC seconds interrupt is enabled as well and toggles RED LED (PTD15) in the ISR.
RTC_CLKOUT (1Hz) and CLKOUT (bus_clk) can be monitored at PTD13 and PTD14 respectively.
CLKOUT is not available in VLPS.
The MCU needs to be power-cycled and run stand-alone.
Test HW: S32K144EVB-Q100
MCU: S32K 0N57U
Debugger: S32DS_ARM_2.2, OpenSDA
Target: internal_FLASH

Tags (3)

Hi Daniel,

I found an issue when I follow your example:


You set SCG->SIRCCSR[LK] = 0 at position 24, but when I check in datasheet LK is in 23.

Should I use bit 23 or 24 right here?

Hi Nhuan,

Thank you, it has been updated.



No ratings
Version history
Last update:
‎10-22-2018 06:35 AM
Updated by: