mscan_loopback_transfer#
Overview#
The mscan_loopback example shows how to use the loopback test mode to debug your CAN Bus design:
To demonstrates this example, only one board is needed. The example will config one MSCAN Message Buffer to Rx Message Buffer and the other MSCAN Message Buffer to Tx Message Buffer with same ID. After that, the example will send a CAN Message from the Tx Message Buffer to the Rx Message Buffer through internal loopback interconnect and print out the Message payload to terminal.
Supported Boards#
FRDM-KE16Z
Hardware requirements
Micro USB cable
FRDM-KE16Z board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the OpenSDA terminal like:
==MSCAN loopback example -- Start.==
Send message!
tx word0 = 0x44332211
tx word1 = 0x88776655
Received message!
rx word0 = 0x44332211
rx word1 = 0x88776655
==MSCAN loopback example -- Finish.==