Tool/software:
Hello.
I think I am having issues with ADC/DMA and trigger latency.
I have both ADCs triggered from an external GPIO with an event splitter.
Both ADCs use ULPCLK at 40 MHz.
Both ADCs have DMA sample count=1 and DMA trigger MEM0 result loaded.
Both ADCs single repeat mode.
Both ADCs 8 bit.
The two DMAs write to two separate buffers.
DMA priority is:
ADC1 (channel 3)
ADC0 (channel 4)
Sometimes, the data is corrupted in the buffer for ADC1.
There is a similar issue reported here
Even at 1 MHz external trigger I get this issue, which seems to be plenty of time for DMA's to finish.
What I am trying to work out is the latency from:
External trigger rising edge to DMA finish.
TRM 8.1.5 says 4 ULPCLK for trigger event = 100 ns
Figure 21-2 says I have no latency from sample start due to ULPCLK use.
....this is not enough information for me to work out -> External trigger rising edge to DMA finish.
It "feels like" the DMA is transferring data from the ADC that is not valid....is there a race here ?
Thanks
Phil