Examples for UART using the GPDMA with variable receive & transmit package lengths ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi All,

I am planning to offload the processing of the UART receive and transmit characters from the processor by using the GPDMA.

My receive and transmit packets are of variable length but never more than 200 characters each.

I imagine a scenario where the GPDMA moves received characters directly into a receive buffer in RAM. I will scan the buffer every 100mS and once a complete packet has been found I will reset the receive buffer pointer.

I will then place a reply packet into the transmit buffer in RAM and trigger the GPDMA to transfer the buffer to the UART. I would like the transfer from buffer to UART to stop when either a NULL character is reached or a character count is reached.

If anyone could point me at some examples to achieve this or provide some advice it would be greatly appreciated.

Best regards
Aaron
0 Likes
2 Replies
Not applicable
Hi Aaron,

I don't know whether there is an exact example to fit your use case. Perhaps you can take reference to:
1) UART001 Example4 using DMA002 multi block transfer mode with auto reload
2) Simple examples using UART001 & DMA003 in Forum thread "UART and GPDMA"

BR,
Zain
0 Likes
Not applicable
Thanks very much Zain, I'll take a look at your suggestions.

Best regards
Aaron
0 Likes