I am writing to see if someone can give me a hand with the ADC on LPC4337
I'm doing a practice in which I have to sample two signals at 200Hz. I need to sample at least 500 points for each cycle. Since I know that the LPC4337 ADC have a sampling frequency of 400 KHz I assumed that is possible.
However the maximum speed that achievement, sampling with DMA Channel 2 and 3 of ADC0 and ADC1 is 33,8kHz. which represents approximately 169 samples per cycle. (To reach that number, (33,8KHz) I turn on and turn off a exit pin, when finished reading the 2 ADC and I measure it with an oscilloscope) If I only activated one channel and one ADC, the actual sample frequency is 79.9 KHz. (Which also remains poorly)
all those test was with BURST Mode disabled. If I configurate the ADC in interruption mode instead of DMA, it is slower yet.
Finally I tryed enabling Burst Mode, and remove the DMA and interrupts. I made a loop and I kept waiting for the data inside a while (1), Channel 2 and Channel 3 ADC0.
/* Waiting for A/D conversion complete */ while (Chip_ADC_ReadStatus(LPC_ADC0, ADC_CH_SEN, ADC_DR_DONE_STAT) != SET) {} /* Read ADC value */ Chip_ADC_ReadValue(LPC_ADC0, ADC_CH_SEN, &dataADC0);
Now the frequency is 100KHz approx. almost exactly 500 points per cycle . But as I start to make something, this consume cycles and the frecuency falls, obviously I do not get the amount of points I need. The ADC is configured with a 400KHz sampling frequency and with 10-bit resolution. the test were without interfering with the reading of the ADC.
Questions: What is the best and fastest way to read the two signals with the ADC? Is it possible to sample faster than 100KHz? Is this a limitation? Are there some extra settings I should do?
I also need to read the two signals simultaneously. Is this possible? if I use the Channel 2 on ADC0 and the channel 2 on ADC1, Are the readings simultaneous ? or sampled first one and then the other.
Any help you can give me I would appreciate it. Sorry for my english. Thank you so much. Natalia