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.

C2000 ADC oversampling

Hello:

I noticed that in some of the literature there is mention of  oversampling an ADC conversion by sampling the same channel twice.  Are there any details in terms of documentation that some one can send me on how and what the limits are?

Thank you,

Frank

  • Hi Frank,

    To over sample, i believe all you need to do is set multiple SOCs in the sequencer to point to the same channel. e.g. for Piccolo series ADC:

    AdcRegs.ADCSOC0CTL.bit.CHSEL = ch_no;

    AdcRegs.ADCSOC1CTL.bit.CHSEL = ch_no;

    AdcRegs.ADCSOC2CTL.bit.CHSEL = ch_no;

    ...

    AdcRegs.ADCSOCnCTL.bit.CHSEL = ch_no;

    If an SOC is fired for ch 0 to ch n, then the result registers will hold multiple samples of the same channel.  You can then do some post processing like averaging or discarding the min/max.  

    The limitation of this is that you only have 16 sequencer slots.  If you want more than 16 samples, you need to set the sequencer up for continuous sampling.

  • Hello Devin

    I'm using ePWM trigger for ADC SoC. Previously, I was sampling at the same frequency as the switching frequency. Now, I want to oversample the signal using the same ePWM trigger for ADC SoC.

    I have configured chA for the duty signal and want to use the chB for oversampling the signal. However, I'm not sure if this is feasible because we need a hard-wired GPIO pin for chB to be used.

    Please correct me if I'm wrong.

    Jaspreet

  • Jaspreet,

    You can set ChB to have the same SOC as ChA. ePWM triggers can fan out to as many SOCs as you like.