Content originally posted in LPCWare by philw4321 on Mon Feb 02 14:26:32 MST 2015
Hi,
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,
dmaChannelNumRx,
_GPDMA_CONN_UART2_Rx,
&pucRxData[0],
GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA,
(uint32_t) uiRxLength);
Many Thanks,
Phil