Page 1 of 1

data format of the adc when the timestamp and DMA feature are enabled

Posted: Mon Oct 26, 2020 9:23 am
by yawimiki
Hi everyone,
I am using at91sama5d27 ek 1 board with following features:
1. 4 channels are enabled with 100khz sampling rate for each channel.
2. ADC readings and timestamp for each 4 bundle of adc values as described in ... 2ADCDevice .
3. use DMA feature with ADC device because kernal would not be able to handle that much number of interrupts.
but the problem is when I have enabled the DMA, the adc data is not correct. I an get the timestamp but adc data are wrong

8 bytes 8 bytes
Chan 0 Chan 1 Chan 2 Chan 3 Timestamp
2 bytes 2 bytes 2 bytes 2 bytes

but if I disable the DMA feature the correct adc data are availble as above format.
so my question is what is the correct data format when I have enabled the timestamp and DMA feature?