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.

TMS320F28377S: Problems with simultaneous use of two SOC within one ADC module

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Hello experts,
I have a problem using two SOC within one ADC module.In my application, I trigger SOC0 and SOC1 of the ADCA module simultaneously on PRD of PWM2.

I have initialised the ADCS as follows:
AdcaRegs.ADCSOC0CTL.bit.CHSEL = (Uint16)2;
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 7;
AdcaRegs.ADCINTSEL1N2.bit.INT1SEL = 0;
AdcaRegs.ADCINTSEL1N2.bit.INT1E = 1;
AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;

AdcaRegs.ADCSOC1CTL.bit.CHSEL = (Uint16)3;
AdcaRegs.ADCSOC1CTL.bit.ACQPS = 14;
AdcaRegs.ADCSOC1CTL.bit.TRIGSEL = 7;

With this setting I get almost the same values in AdcaResultRegs.ADCRESULT0 as in AdcaResultRegs.ADCRESULT1. I have noticed that these are always the values of channel 2 (SOC0). I can put any voltage values on Channel 3, it doesn't change anything in the AdcaResultRegs.ADCRESULT1 register. I suspect it is because SOC0 has higher proirisation.

Does anyone have an idea how to solve this problem?

Kind regards 


Artur 

  • Artur,

    For debug, please use the following C2000Ware example for the ADC. Change only the CHSEL value (and PLL settings if necessary). Try the two channels separately using different builds.

    ~\C2000Ware_xxxx\device_support\f2837xs\examples\cpu1\adc_soc_epwm

    If your hardware is working, the conversions should fall within expectations using the example code base. Then you can focus on the software.

    If the conversions are incorrect with the example, you will want to focus on the hardware first.

    -Tommy

  • Hi Tommy thank you for your tips.
    The error was in my hardware. It turned out that there was no defined signal at the second ADC pin and therefore it was "pulled along" by the first signal. Apparently a soldering error.

    Thank you for your time and effort. Sorry to bother you with this.

    Many greetings
    Artur