[RTD600 IP] S32K3X4EVB-T172 RTI Cycle Wake-up

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

[RTD600 IP] S32K3X4EVB-T172 RTI Cycle Wake-up

[RTD600 IP] S32K3X4EVB-T172 RTI Cycle Wake-up

This example project will show user how to use and configure the basic functionalities of WKPU + RTI (PIT0).

 ------------------------------------------------------------------------------
* Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2)
* MCU: S32K344
* IDE: S32DS3.5 & S32DS3.6
* SDK release: RTD 6.0.0
* Debugger: PE Micro
* Target: internal_FLASH
 ------------------------------------------------------------------------------

This example routine configures the WKPU & PIT for wake-up. The PIT0 instance includes a dedicated RTI (Real Time Interrupt) timer that runs on a separate oscillator clock and can be used for system wakeup. A key feature of this is power saving with a separate input clock for the RTI timer. All other timers share a common core clock.

Note: Only PIT_0 supports the RTI feature, and exists in the Standby domain.

Snag_17d7ab1.png

This example does not poll for a SW press to enter and configure standby; Instead, the main function directly enters the Wkpu_EnterStandby() function which:

  1. Switches core clock to FIRC.
  2. Initializes and configures WKPU instance and wake-up source 3 (RTI).
  3. Initializes and configures PIT0 and PIT0 CH0 as set in Config Tools view.
  4. If EN_RUN_ICYCL_DUTY macro is enabled, configures PIT1 for user code before going to standby. Once Pit1_Notification is entered, runFlag is set to FALSE.
  5. Turns off LED.
  6. Enables RTI channel interrupt (otherwise, MCU cannot be woken up).
  7. Finally, sets the timeout value (WKPU_ICYCL_DUTY_TIME macro) and enters standby.

This showcases the basic configuration for template on a fast-scanning power saving routine (for example, wake-up, measure ADC, go back to sleep). Keep in mind that power saving depends on the frequency of wake-up events. If MCU spends more time in Run mode rather than in Standby mode, power consumption is affected.

The transition time from Standby mode to Run mode is quick. If the MCU only spends 9ms in Run and 1ms in Standby, the average current of the system will be considerably higher than if the MCU was running only 1ms every 1 second.

Refer to S32K3 Low Power Management AN and demos for further information.

After the period defined with either WKPU_ICYCL_DUTY_TIME, MCU wakes up. After wake-up, MCU resets and the cycle repeats.

This example is provided as is with no guarantees and no support.

Attachments
No ratings
Version history
Last update:
‎01-14-2026 03:01 PM
Updated by: