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.

TMS320F28P550SJ: A2 ADC channel does not measure correctly

Part Number: TMS320F28P550SJ

Tool/software:

Hi,

I am trying to configure the ADC for my application. I've been having trouble specifically with A2 channel, even with the example "adc_ex1_soc_epwm".

In this example, channel A1 works perfectly, but if I change it to A2, the value does not match.

This is the behaviour of both channels if the input is 3.3V.

A1 measure                                                                                 A2 measure

              

Is there any additional configuration necessary for this channel to work?

Thank you very much in advanced.

  • Hi, I have some updates.

    I have read the reference manual in search for any configuration that I was missing.
    I found that A2 pin is also a GPIO pin, so this should be done:

    However, this doesn't work either.

  • Hi,

    I Have the same issue with the measurement of ADC Channel A2, I used the example adc_ex10_multiple_soc_epwm, and I try with different version of the Code Composer (12.7.1, 12.8.0, 12.8.1 and 20.3.1) but the ADC A2 not read the correct value.

     

    I created in other project the same configuration of the adc_ex10_multiple_soc_epwm,  and write these register as the Datasheet said, but the ADC A2 not read the correct value.

    AnalogSubsysRegs.AGPIOCTRLH.bit.GPIO224 = 1;
    GpioCtrlRegs.GPHAMSEL.bit.GPIO224 = 1;

    Is there any additional configuration necessary for this channel to work?

    Thank you very much in advanced.

  • Hello Pedro/Javi,

    Can you let me know which hardware you are using?  If it is the LaunchPad, i think you would need to configure the mux (U17) in order for A2 channel to be accessible on the J1/J3 terminals.  The AGPIO channel selection is already taken care of in the pinmux initialization code in example adc_ex10_multiple_soc_epwm.

    Regards,

    Joseph 

  • Hello Joseph,

    Yes, we were using the LaunchPad. Changing the mux solved the problem. Thank you :). I will do a sum up in case it is useful for anyone.

    At first we saw the issue in a custom board. Since the setup to flash it is more complicated, we changed to the LaunchPad, where we saw the same issue. Then, we applied these lines:

    AnalogSubsysRegs.AGPIOCTRLH.bit.GPIO224 = 1;
    GpioCtrlRegs.GPHAMSEL.bit.GPIO224 = 1;

    But since the LaunchPad had the U17 incorrectly configured, we couldn't see the issue solved.

    After changing the mux and try the new configuration lines in our custom board, the issue is solved.

    Thanks again, Joseph.