use EDMA realize a infinite loop circle queue

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

use EDMA realize a infinite loop circle queue

848 Views
wangfan_1987
Contributor I

Hi,

I have a lot of USART data to receive and continue processing. I want to receive the data in a circular queue in RAM, which is mapped to a DMA receiving area.

I can successfully receive the data and use the EDMA_SetModulo function to let the data "circle" in the RAM. But if the received data counter exceeds the number I set, it stops. I think I can use a DMA interrupt to reset the received data counter, but I worry about the interrupt causing me to miss some incoming data. I want to know if there is another way to tell the DMA to reload the received data counter automatically so that I can receive the data without any interrupt.

0 Kudos
Reply
4 Replies

829 Views
wangfan_1987
Contributor I

I found something strange,when I installed a callback with EDMA_SetCallback,Even through I do nothing in this callback function(just a __NOP() in it),the DMA receive circle queue can continue circle as I need.Maybe there is something I need to config?

0 Kudos
Reply

813 Views
_Leo_
NXP TechSupport
NXP TechSupport

Could you please tell us which device are you using please?

0 Kudos
Reply

807 Views
wangfan_1987
Contributor I

sorry,I missed such important info.

I used IMXRT1176's USART3 as recieving port.If I use EDMA_SetCallback(&lpuart3_Rxdmahandle, lpuart3_dma_receive_callback, NULL) set a function for recieving DMA callback,then the receive can circle.Just comment out it,the DMA is finished if DMA receive counter is reached.

0 Kudos
Reply

786 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello,

 

Thank you in advance for contacting NXP support.

Thank you for the information I think the following community post have the information you require for your application.

Please let me know if there is anything else I can do for you.

0 Kudos
Reply