TIDUF72 August 2024
The MSPM0+ MCU is configured to communicate to the PC GUI through an UART interface on J4 in this reference design. The PC GUI polls data from the MSPM0G1106 using a UART module configured for 9600 baud with 8N1. The UART protocol for formatting the UART data is named DLT-645 and the UART module utilizes two DMA Channels: Channel 2 for data receive and Channel 3 for data transmit. See also the MSP430AFE253 Test Report for China State Grid Specification and Single Phase and DC Embedded Metering (Power Monitor) Using MSP430I2040 application notes.
UART data is processed in the
HAL_startUARTDMAReceive() function, by setting a trigger at 14
bytes, as this is the byte which codes the packet length (which can change
dynamically from packet to packet). After decoding the byte 14, the UART DMA
transfer length value gets updated to a new length, which equals the rest of the
DLT-645 protocol packet, transmitted by the PC GUI.