SPRADP4 February 2025 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1 , AM67 , AM68A , AM69A , DRA821U , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1
CanApp_Startup ()
Builds interrupt list and registers ISR for enabled CAN instances
CanApp_PowerAndClkSrc ()
Dummy function for now.
CanApp_PlatformInit ()
Pinmux configuration required for internal loopback testing mode
Write 0x08050007 to specific pad config control register for the MCAN transceiver pin. Further details can be found under Device Configuration > Control Module in TRM.
Confirm the CAN transceiver is enabled by performing a read and compare on the same pin.
Enables CAN Transceiver connected to CAN instances. Please note that for internal loopback testing this is not applicable.
CanApp_LoopbackTest ()
For each enabled instance, follow the steps below:
Initialize CAN hardware
Setup PDU info to transmit
Set CAN controller mode to START
Enable loopback mode
Trigger CAN transmission
Wait for transmission completion
Check for Tx and Rx confirmation success
Set CAN controller mode to STOP
Disable loopback mode
Compare received message Id and Data with PDU Info
Checks for error status, stack corruption and prints result