[RTD600 MCAL] S32K396-BGA-DC1 DIO Wake-up

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

[RTD600 MCAL] S32K396-BGA-DC1 DIO Wake-up

[RTD600 MCAL] S32K396-BGA-DC1 DIO Wake-up

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

 ------------------------------------------------------------------------------
* Test HW: S32K396-BGA-DC1 (SCH-55517 Rev B2)
* MCU: S32K396
* IDE: S32DS3.5 & S32DS v3.6.x
* SDK release: RTD 6.0.0
* Debugger: PEMicro
* Target: internal_FLASH
 ------------------------------------------------------------------------------

This example routine configures the WKPU unit for a GPIO interrupt wake-up. This is the simplest WKPU example. Pin PTB19 (WKPU42) is configured for wake-up. 

The routine waits for SW8 to be pressed, then turns off LED1, and:

  1. Switches core clock to FIRC (Mode C Boot default from Table 125.).
  2. Initializes the WKPU instance.
  3. Configures WKPU42 (SW4).
  4. Enters standby (or fast standby).

After pressing SW4, MCU wakes up, resets and polls for SW8 to be pressed again.

If FAST_STANDBY is selected, Wkup_FastWkupBootAddress() is entered and both LED2 & LED3 blink before jumping to reset handler for full initialization.

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

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-2217081%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%5BRTD600%20MCAL%5D%20S32K396-BGA-DC1%20DIO%20Wake-up%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2217081%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%3CP%3E%3CSPAN%3EThis%20example%20project%20will%20show%20user%20how%20to%20use%20and%20configure%20the%20basic%20functionalities%20of%20ICU%20(WKPU)%20%2B%20DIO%20(GPIO).%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%20S32K396-BGA-DC1%20(SCH-55517%20Rev%20B2)%3CBR%20%2F%3E*%20MCU%3A%20S32K396%3CBR%20%2F%3E*%20IDE%3A%20S32DS3.5%20%26amp%3B%20S32DS%20v3.6.x%3CBR%20%2F%3E*%20SDK%20release%3A%20RTD%206.0.0%3CBR%20%2F%3E*%20Debugger%3A%20PEMicro%3CBR%20%2F%3E*%20Target%3A%20internal_FLASH%3CBR%20%2F%3E%26nbsp%3B------------------------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThis%20example%20routine%20configures%20the%20WKPU%20unit%20for%20a%20GPIO%20interrupt%20wake-up.%20This%20is%20the%20simplest%20WKPU%20example.%20Pin%20PTB19%20(WKPU42)%20is%20configured%20for%20wake-up.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20routine%20waits%20for%20%3CSTRONG%3ESW8%3C%2FSTRONG%3E%20to%20be%20pressed%2C%20then%20turns%20off%20LED1%2C%20and%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSPAN%3ESwitches%20core%20clock%20to%20FIRC%20(Mode%20C%20Boot%20default%20from%20Table%20125.).%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EInitializes%20the%20WKPU%20instance.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EConfigures%20WKPU42%20(%3CSTRONG%3ESW4%3C%2FSTRONG%3E).%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EEnters%20standby%20(or%20fast%20standby).%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%3EAfter%20pressing%20%3CSTRONG%3ESW4%3C%2FSTRONG%3E%2C%20MCU%20wakes%20up%2C%20resets%20and%20polls%20for%26nbsp%3B%3CSTRONG%3ESW8%3C%2FSTRONG%3E%26nbsp%3Bto%20be%20pressed%20again.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20%3CSTRONG%3EFAST_STANDBY%3C%2FSTRONG%3E%20is%20selected%2C%26nbsp%3BWkup_FastWkupBootAddress()%20is%20entered%20and%20both%20LED2%20%26amp%3B%20LED3%20blink%20before%20jumping%20to%20reset%20handler%20for%20full%20initialization.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3E%3CSPAN%3EThis%20example%20is%20provided%26nbsp%3B%3CU%3Eas%20is%3C%2FU%3E%26nbsp%3Bwith%20no%20guarantees%20and%20no%20support.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎06-08-2026 09:16 AM
Updated by: