SLAAEK9 February 2025 MSPM0C1103 , MSPM0C1103-Q1 , MSPM0C1104 , MSPM0C1104-Q1 , MSPM0C1105 , MSPM0C1106 , MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1 , MSPM0H3216 , MSPM0L1105 , MSPM0L1106 , MSPM0L1117 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1
The main function of LIN commander demo code is to send different command in LIN protocol frame. As the two bottoms are pressed, PID 0x39 and 0x08 are sent desperately. One is to light LED of responder and the other one is to receive data from responder.
Figure 2-1 shows the flow process of LIN commander demo code.
To initialize the hardware, TI System Configuration Tool (SysConfig) is used to generate configuration code of UART, such as UART clock, pin configuration and so on. In this demo code, we choose 19200 Baud Rate, following the LIN specs regulation.
Table 2-3 shows a summary for the LIN commander project, which includes the main used definitions and functions.
| Name | Task | Description | Location |
|---|---|---|---|
| LIN_TABLE_INDEX_PID_xx | definition | The PID of each frame | lin_command.c |
| LIN_MESSAGE_NOT_FOUND | definition | 0xFF. UART LIN value for the message not found | lin_config.h |
| LIN_SYNC_BYTE | definition | 0x55. UART LIN value for the sync byte | lin_config.h |
| LIN_BREAK_LENGTH | definition | 0x08. UART LIN break length to 1ms | lin_config.h |
| SYSCFG_DL_init() | function | Initialize the peripherals, generated by Sysconfig | ti_msp_dl_config.c |
| DL_UART_enableLINSendBreak(UART_Regs *uart) | function | Enable send break. when enabled, a low level is continually output on the TXD signal after completing transmission of the current character | dl_uart.c |
| DL_UART_disableLINSendBreak(UART_Regs *uart) | function | Disable send break | dl_uart.c |
| LIN_Commander_transmitMessage(UART_Regs *uart, uint8_t tableIndex, uint8_t *buffer, LIN_table_record_t *messageTable) | function | LIN transmits message | lin_config.c |
| LIN_processMessage_Rx() | function | Process as message received | Lin_commander.c |