I am testing the example software adc_soc_continuous_cpu01 to acquire a sine wave from a function generator connected to the adc pin (I am using a launchxl board).
In this program SOCs 0 to 7 are triggered, then the EOC6 triggers SOCs 8 to 15, hence the second group of SOCs starts to acquire while results 0 to 7 are stored in a buffer; EOC14 triggers SOCs 0 to 7 which start to acquire while results 8 to 15 are stored in the buffer; the cycle is repeated until the buffer is full.
The signal sent to the ADC is a sinewave of frequency 50 kHz. In the following figure the results of acquisition are shown:
You can see there is always a problem with the results of SOC8. I tried to exclude SOC8 by commenting the lines
//AdcaRegs.ADCINTSOCSEL2.bit.SOC8 = 1;
in configureADC() routine, and
//AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT8;
in main(), i.e. SOCs 0 to 7 are triggered for first, and SOCs 9 to 15 for second, SOC8 is not used. In this way I get correct results:
I verified that I have the same problem with SOC8 in ADCA, ADCB and ADCC. Moreover I have two launchxl board, and I have the same problem with both.
Could anyone please explain this strange error and how to solve it (if possible)?
Regards,
Francesco