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.

[FAQ] UART RX ms-level timeout realization based on Event for MSPM0

Other Parts Discussed in Thread: MSPM0L1306

The timeout function on MSPM0G or MSPM0L UART can't reach ms level.

Here is an example to realize it based on 1 UART, 1 Timer, 2 DMA.

Here is the blockdiagram. The key point is that it doesn't use UART Rtrigger DMA to move the RXDATA to buffer. It use UART RX trigger DMA to update Timer registers. It use CC0 to trigger another DMA to move RXDATA to buffer. When keep receiving data from RX, the counter will be reinitialized and CC0 will keep to be triggered. When the data transmition is finished, the counter will count to CC1 and generate a CPU interrupt.  

Here is the test result(0.1s delay):

Here is the code:

Uart_Timeout_MSPM0L1306.zip

**Attention** This is a public forum