This example project will show user how to use and configure the basic functionalities of ICU (WKPU) + CAN.
------------------------------------------------------------------------------
* Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2)
* MCU: S32K344
* IDE: S32DS3.5 & S32DS v3.6.x
* SDK release: RTD 6.0.0
* Debugger: PE Micro
* Target: internal_FLASH
------------------------------------------------------------------------------
This project configures both Can_43_FLEXCAN and CanIf modules for CAN communication, along with the ICU (WKPU) module for wake-up. Transmission is done via POLLING, while reception is configured via INTERRUPT.
Tx MB is set to STD ID 123h.
Acceptance mask is set to 0x0 (accept all IDs).
CAN messages are sent using Can_43_FLEXCAN_Write() and received using the CanIf_RxIndication() callback. After CanIf_bRxFlag is set, an ACK message is sent back.
If TJA1153 transceiver is used, macro TJA1153_EVB_TRCV must be used. If not, use TJA1043_EVB_TRCV for standard transceiver initialization (CAN0_STB & CAN0_EN pins set to HIGH).
FlexCAN bitrate is calculated with: CAN bit timing calculator sheet.
Main routine:
If a CAN frame is received, MCU will wake-up and wait for SW5 to be pressed again.
Note: The first CAN frame may not be fully received since there will be some time for the MCU to warm up from STANDBY mode back to RUN mode, so the application may need to ignore the first CAN frame.
Note 2: In order to test this example, another CAN node must be connected to CAN0_OUT.
This example is provided as is with no guarantees and no support.