[RTD600 IP] S32K3X4EVB-T172 RTC Timeout Wake-up

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[RTD600 IP] S32K3X4EVB-T172 RTC Timeout Wake-up

[RTD600 IP] S32K3X4EVB-T172 RTC Timeout Wake-up

This example project will show user how to use and configure the basic functionalities of WKPU + RTC timeout. 

 ------------------------------------------------------------------------------
* 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 & RTC units for wake-up. The RTC is present in always ON domain, hence available in RUN mode as well as in STANDBY mode.

Snag_146849f.png

The RTC can trigger a single wake-up event (timeout). When the RTC counter reaches a specific, pre-defined alarm time set by the user.

RTC timeout is mapped as wake-up source 1. RTC0_CLK source is configured as SIRC_CLK, and SIRC_CLK must be enabled in standby mode.

Snag_14e35ad.pngSnag_14e5376.png

Chapter 69.3.1 RTC explains the functionality of the RTC timer. RTCVAL is updated at the point where no counter match is due as per the previous RTCVAL, the RTCF flag is set when the counter matches the new value. If there is a match when in the low-power mode, then the RTC first generates a wakeup request to force a wakeup to run mode, and then the RTCF flag is set.

The routine waits for SW5 to be pressed, then turns off the green LED, and enters Wkpu_EnterStandby() function which:

  1. Switches CORE_CLK to FIRC.
  2. Initializes the WKPU instance.
  3. Configures WKPU1 & WKPU42 (PTB19).
  4. Initializes and enables interrupt for RTC.
  5. Loads the RTCVAL value to 5000ms. 
  6. Starts the counter.
  7. Enters standby (or fast standby).

After the period defined with RTC_TIME or RTC_PERIOD_DELAY_MS(x) macros defined in Wkpu.h, MCU wakes up. After wake-up, MCU resets and polls for SW5 to be pressed again.

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

添付
評価なし
バージョン履歴
最終更新日:
1週間前
更新者: