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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

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

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

 ------------------------------------------------------------------------------
* 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_120dece.png

The chip contains one instance of RTC (Real Time Clock) timer and API (Autonomous Periodic Interrupt) timer, where both can perform 32-bit comparisons. Both RTC and API timers can generate interrupts as well as wake-up from low power modes.

The following figure highlights the path for RTC API wake-up. Please refer to Chapter 69.3.2 API functional description from the S32K3XX reference manual (Rev. 12) for further information.

Julin_AragnM_0-1768424703841.png

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 WKPU2 & WKPU42 (PTB19).
  4. Initializes and enables interrupt for RTC.
  5. Enables RTC API and loads the APIVAL to 3000ms. 
  6. Starts timer.
  7. Enters standby (or fast standby).

After the period defined, RTC API generates an interruption and MCU wakes up. After wake-up, MCU resets and polls for SW5 to be pressed again.

The RTC API value can be changed with RTC_PERIOD_DELAY_MS(x) macro defined in Wkpu.h.

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

附件
无评分
版本历史
最后更新:
星期三
更新人: