Best way to check amount data received through the DMA

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by philw4321 on Mon Feb 02 14:26:32 MST 2015

I am using the DMA to receive data from the USUART port. I am trying to figure out the best way to check the amount (number bytes) of data I actually received at the end of the time out period. I do use the DMA interrupt to indicate when a fixed amount of data has been received, the length I request is sometimes larger than the amount of data actually received. The data is real just less than the requested amount from the DMA.

So I am looking to figure out how much data I did receive when I do not get an interrupt.

I there a mechanism to check the DMA pnt position?

For reference I am using FreeRTOS with task notification for the time out and this is the setup of the DMA transfer:

    TransferStaus = Chip_GPDMA_Transfer(LPC_GPDMA,
(uint32_t) uiRxLength);

Many Thanks,