SPRUJ79 November 2024 F29H850TU , F29H859TU-Q1
When using the RTDMA with the TX FIFO, the RTDMA Burst Size [DMA_BURST_SIZE] must equal 16 - the number of bytes used to trigger the FIFO level interrupt defined by TXIFSEL in UARTIFLS. For example, a level of 1/8 is triggered by having 14 bytes or less present in the FIFO, so DMA_BURST_SIZE = 16 - 14 = 2. To make sure that the RTDMA writes all data correctly to the TX FIFO, the RTDMA Burst Size must also be an integer divisor of the total number of UART transmissions. For complete data transmission, follow these steps:
1. Decide the total number or words to be transmitted. [BUFFER_SIZE]
2. Decide the necessary FIFO level [UART_BUFFER_SIZE] and set TXIFSEL accordingly.
3. Calculate the number of RTDMA transfers. [DMA_TRANSFER_SIZE = BUFFER_SIZE / UART_BUFFER_SIZE]
4. Calculate the RTDMA Burst Size. [DMA_BURST_SIZE] to equal 16 - UART_BUFFER_SIZE.
5. Configure the RTDMA using the calculated values and use UART peripheral trigger as the trigger source.
To transmit 120 words from the UART using the RTDMA:
BUFFER_SIZE = 120
UART_BUFFER_SIZE = 12
TXIFSEL: 1 - (UART_BUFFER_SIZE / 16) = 1 - 3/4 = 1/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 transmitted with each transfer)