This example shows how to use the CAN Receive, CAN Transmit, DIP Switch, and LED blocks for CAN loopback testing.
Available versions of this example:
The following figure shows the example model:
"Read SW4 DIP Switch" subsystem reads the position of the four SW4 DIP switches on the DM6437EVM board. "Transmit CAN Msg" block uses mailbox 2 to transmit the DIP switch positions packed in a standard CAN message frame, while "Receive CAN Msg" uses mailbox 3 to receive it. When a CAN message is received, "Light LED" subsystem extracts the value of the DIP switch positions and passes them to the LED block to be displayed on the DS1 - DS4 LEDs on the DM6437EVM board. DSn, n = 1..4, LED turns on when SW4(n-1) is in down position and turns off when SW4(n-1) is in up position.
Change the position SW4(0) - SW(3) while the generated code is running on the target to see the DS1 - DS4 LEDs respond accordingly indicating a successful CAN message transaction.
TMS320DM6437 EVM Module
TMS320DM6437 EVM: DaVinci Digital Video Development Kit (DVSDK) Version 1.01 (RTM release 1.01.00.15)
DM6437EVM Target Content Package version 2.0 from Spectrum Digital
Open the model.
Double-click "Build Reload & Run" to generate, build, load and run the code on the DM6437EVM board.