Uart DMA RX with peripheral used as the flow controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Uart DMA RX with peripheral used as the flow controller

542 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fcarlo on Fri May 24 08:51:33 MST 2013

Hi,

I am trying to configure UART1 with the DMA controller enabled. Everything works fine when DMA controller is set as flow controller, but I cannot get the thing working when UART1 peripheral is set as the flow controller.

According to the UM, in DMA mode the receiver DMA is asserted on the event of the receiver FIFO level becoming equal to or grater than trigger level, or if a character timeout occours.

Is there any working example that show how to configure UART with DMA, using the peripheral as the flow controller?

Labels (1)
0 Kudos
1 Reply

344 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DF9DQ on Fri May 24 14:54:05 MST 2013

The flow controller is the one who knows that the whole DMA transaction is over. However, most peripherals (including UART) cannot act as flow controller, because they cannot count the number of transfers done. So I see no reason to make UART1 the flow controller.


The concept of flow control is different from the peripheral request which triggers a transfer! In your case selecting peripheral-to-memory (DMA control) will let the UART request transfers whenever the FIFO reached the trigger level (burst request) or whenever a timeout occurs (single request). Since the DMA is the flow controller, it will stop the transaction and disable the DMA channel once the programmed number of transfers (i.e. UART characters) has been transferred.


0 Kudos