SLAAEN4 March 2025 MSPM0G1106 , MSPM0G1107 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1
The CAN-UART bridge connects the CAN and UART interfaces. The example in this article can rely on the XDS110 on the launchpad to observe the UART data with a PC. User can also send messages from a PC over the CAN-UART bridge to the CAN bus. For CAN bus data, users can use a CAN analyzer or two LaunchPADs to form a loop, as shown in Basic Structure of Accompanying Demo.
The example in this article supports both transparent transmission and protocol transmission. Figure 1-1 shows the PC terminal program for transparent transmission. Figure 1-2 shows the PC terminal program for protocol transmission.
For protocol transmission, this example specifies the UART message format. Users can also modify the format according to application requirements. When receiving the message from UART, the message format is < 55 AA ID1 ID2 ID3 ID4 Length Data1 Data2 ...>. Users can send data to the CAN bus from the terminal by entering data in the same format. 55 AA is the header. ID area is four bytes. The length area is one byte, which indicates the data length.
For transparent transmission, a configurable timeout is used for UART to detect one message. Data from UART is filled into the data area of CAN (same in reverse). CAN ID is the default value.
Figure 1-1 PC Terminal Program for
Transparent Transmission
Figure 1-2 PC Terminal Program for
Protocol Transmission