Example S32K312 STANDBY wake up using CAN-0-RX and GPIO Switch DS3.5 RTD300

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

Example S32K312 STANDBY wake up using CAN-0-RX and GPIO Switch DS3.5 RTD300

Example S32K312 STANDBY wake up using CAN-0-RX and GPIO Switch DS3.5 RTD300

*******************************************************************************

 The purpose of this demo application is to present a usage of the
 POWER & WKUP IP Driver for the S32K3xx MCU.

In current example :--
SW-6 = PTB-19 -----> PRESS to enter the STANDBY mode.
SW-5 = PTB-26 = WKUP[41] --> PRESS to exit the STANDBY mode.
CAN-0-RX = PTA-6 = WKUP[15] --> send CAN message to exit the STANDBY mode.

The example uses PIT-0 timer, to generate the periodic interrupt.

The example uses FLEXCAN-0 for transmit & receive using following Message buffer :--
#define RX_MB_IDX_0 10U
#define RX_MB_IDX 11U
#define TX_MB_IDX 12U


BAUDRATE : 500 KBPS

 ------------------------------------------------------------------------------
* Test HW: S32K3X2EVB-Q172
* MCU: S32K312
* Compiler: S32DS3.5
* SDK release: RTD 3.0.0
* Debugger: PE micro
* Target: internal_FLASH
********************************************************************************

 

Dinesh_Guleria_0-1718885427589.png

 

Push button :--

Dinesh_Guleria_1-1718885710580.png

 

Dinesh_Guleria_2-1718885752727.png



Wake-up source, CAN-0-RX :--
According to the IOMUX table in RM, for example, PTA6 can be used as WKPU15 and CAN0_RX. It means that the WKPU15 input doesn't require specific MSCR configuration.
So if its input buffer is enabled and the corresponding WKPU input channel is enabled/configured in the WKPU, it should be able to act as wake-up input.

Dinesh_Guleria_3-1718885882871.png



Wake-up source, SW-5 GPIO:--

Dinesh_Guleria_4-1718885972993.png


Standby entry :--

Dinesh_Guleria_0-1721374048540.png

 

STandby clock :--

Dinesh_Guleria_1-1721374133669.png


Enter Standby mode :--

Dinesh_Guleria_2-1721374180467.png

 

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1891411%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S32K312%20STANDBY%20wake%20up%20using%20CAN-0-RX%20and%20GPIO%20Switch%20DS3.5%20RTD300%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1891411%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CDIV%20class%3D%22lia-message-template-content-zone%22%3E%0A%3CP%3E%3CSPAN%3E*******************************************************************************%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20purpose%20of%20this%20demo%20application%20is%20to%20present%20a%20usage%20of%20the%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BPOWER%20%26amp%3B%20WKUP%20IP%20Driver%20for%20the%20S32K3xx%20MCU.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3EIn%20current%20example%20%3A--%3CBR%20%2F%3ESW-6%20%3D%20PTB-19%20-----%26gt%3B%20PRESS%20to%20enter%20the%20STANDBY%20mode.%3CBR%20%2F%3ESW-5%20%3D%20PTB-26%20%3D%26nbsp%3BWKUP%5B41%5D%20--%26gt%3B%26nbsp%3BPRESS%20to%20exit%20the%20STANDBY%20mode.%3CBR%20%2F%3ECAN-0-RX%20%3D%20PTA-6%20%3D%26nbsp%3BWKUP%5B15%5D%20--%26gt%3B%26nbsp%3Bsend%20CAN%20message%20to%20exit%20the%20STANDBY%20mode.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EThe%20example%20uses%20PIT-0%20timer%2C%20to%20generate%20the%20periodic%20interrupt.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20example%20uses%20FLEXCAN-0%20for%20transmit%20%26amp%3B%20receive%20using%20following%20Message%20buffer%20%3A--%3CBR%20%2F%3E%3C%2FSPAN%3E%23define%20RX_MB_IDX_0%2010U%3CBR%20%2F%3E%23define%20RX_MB_IDX%2011U%3CBR%20%2F%3E%23define%20TX_MB_IDX%2012U%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSPAN%3EBAUDRATE%20%3A%20500%20KBPS%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B------------------------------------------------------------------------------%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Test%20HW%3A%20S32K3X2EVB-Q172%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20MCU%3A%20S32K312%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Compiler%3A%20S32DS3.5%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20SDK%20release%3A%20RTD%203.0.0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Debugger%3A%20PE%20micro%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E*%20Target%3A%20internal_FLASH%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E********************************************************************************%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1718885427589.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1718885427589.png%22%20style%3D%22width%3A%20399px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285068i31A459D6886F3299%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1718885427589.png%22%20alt%3D%22Dinesh_Guleria_0-1718885427589.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3EPush%20button%20%3A--%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1718885710580.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1718885710580.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285072i31D60B55D2278FC5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1718885710580.png%22%20alt%3D%22Dinesh_Guleria_1-1718885710580.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_2-1718885752727.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_2-1718885752727.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285073i0C552782CA099D02%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_2-1718885752727.png%22%20alt%3D%22Dinesh_Guleria_2-1718885752727.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EWake-up%20source%2C%20CAN-0-RX%20%3A--%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSPAN%3EAccording%20to%20the%20IOMUX%20table%20in%20RM%2C%20for%20example%2C%20PTA6%20can%20be%20used%20as%20WKPU15%20and%20CAN0_RX.%26nbsp%3BIt%20means%20that%20the%20WKPU15%20input%20doesn't%20require%20specific%20MSCR%20configuration.%3CBR%20%2F%3ESo%20if%20its%20input%20buffer%20is%20enabled%20and%20the%20corresponding%20WKPU%20input%20channel%20is%20enabled%2Fconfigured%20in%20the%20WKPU%2C%20it%20should%20be%20able%20to%20act%20as%20wake-up%20input.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_3-1718885882871.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_3-1718885882871.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285074iB2FF4ABC568C8CF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_3-1718885882871.png%22%20alt%3D%22Dinesh_Guleria_3-1718885882871.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EWake-up%20source%2C%20SW-5%20GPIO%3A--%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_4-1718885972993.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_4-1718885972993.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285075iADAE305AEE42E004%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_4-1718885972993.png%22%20alt%3D%22Dinesh_Guleria_4-1718885972993.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EStandby%20entry%20%3A--%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1721374048540.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1721374048540.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F289326i85D38C8AD169BB44%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1721374048540.png%22%20alt%3D%22Dinesh_Guleria_0-1721374048540.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESTandby%20clock%20%3A--%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1721374133669.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1721374133669.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F289327iFFF183839061BF50%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1721374133669.png%22%20alt%3D%22Dinesh_Guleria_1-1721374133669.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3EEnter%20Standby%20mode%20%3A--%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_2-1721374180467.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_2-1721374180467.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F289328iBAB10B79257C67D1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_2-1721374180467.png%22%20alt%3D%22Dinesh_Guleria_2-1721374180467.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3C%2FDIV%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎07-19-2024 12:29 AM
Updated by: