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
In the design of this article, the CAN-UART bridge uses both CAN receive and transmit and UART receive and transmit. So both the CAN module and the UART module must be configured. Since the message formats of different communications are different, the CAN-UART bridge also must convert the message format.
For CAN, the CAN module supports both classic CAN and CAN FD (CAN with flexible data-rate) protocols. The CAN module is compliant to ISO 11898-1:2015. For more information, see to the related document. For UART, the interface can be used to transfer data between a MSPM0 device and another device with serial asynchronous communication protocols. For more information, see the related document.Figure 2-1 shows the basic principle of the CAN-UART bridge. Typically, the communication rate of CAN is much higher than that of UART. For CAN FD the baud rate can be up to 5Mbps, while the UART operates at 9600bps as in the example code. As a result, it is possible that the data received by CAN is not sent by the UART in time. To match the rate, this scheme uses a buffer to transfer data between CAN and UART. This buffer not only implements data caching, but also implements data format conversion. This is equivalent to adding a barrier between the two communication interfaces. Users can add overload control actions for the overload case.