Example S32K144 RTC VLPS

Document created by Daniel Martynek Employee on Oct 22, 2018Last modified by Daniel Martynek Employee on Jun 8, 2020
Version 2Show Document
  • View in full screen mode

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

1 person found this helpful