SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
When using the DMA with the RX FIFO, the DMA 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 DMA correctly receives all data from the RX FIFO, the DMA 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 DMA transfers. [DMA_TRANSFER_SIZE = BUFFER_SIZE / UART_BUFFER_SIZE]
4. Set the DMA Burst Size [DMA_BURST_SIZE] equal to the UART_BUFFER_SIZE.
5. Configure DMA using the calculated values and use the UART peripheral trigger as the trigger source.
To receive 120 words from the UART using the DMA:
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)