RT1064 Uart with EDMA

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

RT1064 Uart with EDMA

357 Views
frank9
Contributor II

In my application I need to receive variable sized Uart packets.  I tried using the FSL LPUART EDMA driver, but it appears to only trigger the user callback after receiving the configured number of bytes.  For example, if I call receive with 100 bytes, then I get the callback after I receive 100 bytes.  But in my application, I will be receiving variable sized packets, so therefore I believe I need the Rx Idle Interrupt to trigger.  For example, Rx Idle Interrupt can allow a packet of only 30 bytes to be passed to user callback.  Can the LPUART EDMA be used for this type of application?  Can it be modified to use Rx Idle Interrupt?  Or should I not use EDMA for this type of application?     

0 Kudos
Reply
1 Reply

339 Views
mjbcswitzerland
Specialist V

Hi

The uTasker project uses the following solution:
Free-running Rx DMA - part 1
https://www.youtube.com/watch?v=dNZvvouiqis&list=UULFNA3AvzlL056aFseFHs3Qlg&index=76
Free-running Rx DMA - part 2
https://www.youtube.com/watch?v=GaoWE-tMRq4&list=UULFNA3AvzlL056aFseFHs3Qlg&index=75
Rx DMA with idle-line interrupt
https://www.youtube.com/watch?v=OrqSn9x7N1E&list=UULFNA3AvzlL056aFseFHs3Qlg&index=46

The same UART driver is also used for the i.MX RT (USART) with the same characteristics.

Regards

Mark

For i.MX and Kinetis stock availability see https://www.utasker.com/Shop/semi.html

0 Kudos
Reply