This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3507: 串口、DMA、FIFO、RX Timeout

Part Number: MSPM0G3507

Tool/software:

MSPM0G3507 serial port DMA receives variable-length data frames. When FIFO is enabled with ≥ 3 entries and RX Timeout is enabled, the RX Timeout interrupt can be entered normally when the data frame length is not a multiple of 3. However, when the data frame length is a multiple of 3, the FIFO is empty, preventing the RX Timeout interrupt from being entered and causing the DMA to fail to restart. When the FIFO capacity is changed to other data, errors also occur in data frames of corresponding lengths. How can this issue be resolved?

  • When FIFO is enabled with ≥ 3 entries and RX Timeout is enabled, the RX Timeout interrupt can be entered normally when the data frame length is not a multiple of 3.

    This is correct, function limitation.

    How can this issue be resolved?

    Add another timer to read DMA size, is size is changed, restart timer, if size is 0, stop timer, if size is not changed, timeout should be triggered.

  • I haven't found a function to read the current DMA size in the DMA header file. So, do I need to write the function to read the DMA size myself, or is there a library function available from TI that I can use?

  • Here is the register:

    5.3.24 DMASZ[j] in TRM.

    And API in dam.h:

    __STATIC_INLINE uint16_t DL_DMA_getTransferSize(const DMA_Regs *dma, uint8_t channelNum)