HSADC missing samples (LPC 4370)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by Marquardt on Wed Apr 27 04:34:45 MST 2016
Hello all,

I got a problem with my hsadc-code, it seems that every eight samples the adc is going to stop and sleep for a short time. The code, which is based on the periph_hsadc example and the laptool code and a plotted diagram of a 4MHz sinuswave are attached. I am using DMA to save the FIFO to a ringbuffer.
Based on the user manual, I thought about three possible bottlenecks:

- the second descriptor table must be preloaded an updated through DMA?
- the trigger for the descriptortable-initiation is taking too long?
- the FIFO is full and can't be emptied fast enough, so the remaining samples can't be safed?

Did anybody of you encounter a similar problem or can find the problem in my code?

Thanks in advance!

P.S: I am trying to build a 4 channel oscilloscope with the Link2-board. Is there maybe anything else I should mind?

Original Attachment has been moved to: hsadc_2.c.zip