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
Functions in Table 3-2 are categorized into different files. Functions for UART receive and transmit are included in bridge_uart.c and bridge_uart.h. Functions for CAN receive and transmit are included in bridge_can.c and bridge_can.h. The structure of the FIFO element is defined in user_define.h.
Users can easily separate functions by file. For example, if only UART functions are required, users can reserve bridge_uart.c and bridge_uart.h to call the functions.
For the basic configuration of peripherals, this project integrates the SysConfig configuration file. Users can easily modify the basic configuration of peripherals by using SysConfig.
Applications requiring this functionality must include the CAN module API and UART module API. All API files are included with the SDK download.
Table 3-3 lists the footprint of the CAN-UART bridge design in terms of flash size and RAM size. Figure 3-1 and Table 3-3 were made using Code Composer Studio (Version: 12.7.1.00001) with optimization level 2.
The user can adjust the size of the FIFO. A larger FIFO means more cache capacity, but also takes up more RAM space. For details, see the relevant content in Section 5. In addition, the size of the data field in this code is set to a maximum of 64 bytes by default. The user can configure the data field size according to the actual data length. Using an 12 byte data field can significantly reduce RAM usage, as listed in Table 3-3
| Minimum Required Code Size (bytes) | Flash | SRAM |
|---|---|---|
| CAN-UART bridge (Protocol Transmission) U2C_FIFO_SIZE=8 C2U_FIFO_SIZE = 8 Data size = 12 bytes) |
6328 | 910 |
| CAN-UART bridge (Protocol Transmission) U2C_FIFO_SIZE=8 C2U_FIFO_SIZE=8 Data size = 64 bytes) |
6416 | 2054 |
| CAN-UART bridge (Protocol Transmission U2C_FIFO_SIZE=30 C2U_FIFO_SIZE=30 Data size = 12 bytes) |
6432 | 1966 |