This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28379D: Trouble with SOC8 when testing adc_soc_continuous_cpu01 example

Part Number: TMS320F28379D


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

  • Hi Francesco,

    It looks like there is a bug in the example where SOC8 ACQPS is not set:

    	AdcaRegs.ADCSOC0CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC1CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC2CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC3CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC4CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC5CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC6CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC7CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC9CTL.bit.ACQPS  = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC10CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC11CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC12CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC13CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC14CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles
    	AdcaRegs.ADCSOC15CTL.bit.ACQPS = acqps;    //sample window is acqps + 1 SYSCLK cycles

    This results in an invalid S+H time based on the default reset value of the 'ACQPS' register.