SPRUJ79 November 2024 F29H850TU
When using the RTDMA with the RX FIFO, the RTDMA Burst Size [DMA_BURST_SIZE] must equal the number of bytes used to trigger the FIFO level interrupt defined by RXIFLSEL in UARTIFLS. For example, a level of 1/8 is triggered by 2 bytes or more present in the FIFO, so DMA_BURST_SIZE = 2. To make sure that the RTDMA correctly receives all data from the RX FIFO, the RTDMA Burst Size also must be an integer divisor of the total number of UART receives. For complete data reception, follow these steps:
1. Decide the total number of words to be received. [BUFFER_SIZE]
2. Decide the necessary FIFO level [UART_BUFFER_SIZE] and set RXIFSEL accordingly.
3. Calculate the number of RTDMA transfers. [DMA_TRANSFER_SIZE = BUFFER_SIZE / UART_BUFFER_SIZE]
4. Set the RTDMA Burst Size. [DMA_BURST_SIZE] equal to the UART_BUFFER_SIZE.
5. Configure RTDMA using the calculated values and use the UART peripheral trigger as the trigger source.
To receive 120 words from the UART using the RTDMA:
BUFFER_SIZE = 120
UART_BUFFER_SIZE = 12
RXIFSEL: UART_BUFFER_SIZE / 16 = 3/4
DMA_TRANSFER_SIZE: BUFFER_SIZE / UART_BUFFER-SIZE = 120/12 = 10
DMA_BURST_SIZE: UART_BUFFER_SIZE = 12
(1 burst = 12 words, 1 transfer = 10 bursts, 120 words received with each transfer)