Part Number: AM2434
Hi experts,
i encountered a problem when using UART with DMA to partially read a UART message.
I'm trying to read a package of unknown size with UART and DMA (PKTDMA instance) in two read calls. The first call reads the header with the length and the second call reads the rest of the package according to the length. With this implementation im getting random package drops though, because the DMA rearm between the first and second read doesnt work properly. In case of a package drop the UART read on the payload part finishes with less bytes read than requested, but the FIFO is empty.
If i am using an interrupt based transfer (no DMA) or a delay between the header and payload part (with DMA) it works flawlessly, so i guess it is a timing issue with the rearm while the old DMA request is not properly finished.
Can you help me, how to fix this problem?
Cheers,
Robin