Hi,
I am aware of MCUXpresso SDK and I have checked for this case the examples, but I didn't find one. Also went through documentation and I do not see anything wrong with my code. Here is my excerpt of code how to set things up (I know it is NuttX driver, but the important stuff is clearly visible):
struct imxrt_edma_xfrconfig_s config;
config.saddr = flexio->ops->get_shifter_buffer_address(flexio, FLEXIO_SHIFTER_BUFFER_BIT_SWAPPED, FLEXIO_RX_SHIFTER_INDEX);
config.daddr = (uint32_t)&dmarxbuf[0];
config.soff = 0;
config.doff = 4;
config.iter = 512;
config.flags = EDMA_CONFIG_LINKTYPE_LINKNONE |
EDMA_CONFIG_LOOPDEST |
EDMA_CONFIG_INTHALF |
EDMA_CONFIG_INTMAJOR;
config.ssize = EDMA_32BIT;
config.dsize = EDMA_32BIT;
config.nbytes = 4;
imxrt_dmach_xfrsetup(priv->rxdma, &config);
My destination buffer is in uncached section. What is different from examples, is LOOPDEST flag, where destination address is looped back to begining. What I am asking here, is there a possibility that DONE interrupt is triggered and DONE flag is cleared by hardware, if interrupt is not serviced imedialtely? This is my only explanation of what I am seeing im my case.
Another weird thing I am seeing here is, when I put my dma rx buffer into uncached section (i.e. OCRAM_ECC), DMA is reading correct data, but if I put it into DTCM (which is also uncached), I do not get valid data.