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.

TMS320F2800157: How to declare the A16/C16/GPIO028 pin as an analog pin by using Sysconfig?

Part Number: TMS320F2800157
Other Parts Discussed in Thread: SYSCONFIG

Hello All,

I am using TMS320F2800157

How can I configure the A16/C16/GPIO028 pin as an analog pin using Sysconfig? I attempted this with a different SOC4, replacing ADCint4 with ADCint16. However, the register consistently reads 0xFFF without updating the ADC values when adjusting the voltage with a potentiometer.

Could someone please offer guidance on properly setting up A16/C16/GPIO028 as an analog pin in Sysconfig?

Thanks & Regards,

Siva Kumar

  • Hi Siva,

    Could you check if the following bit is set in the register window:

    This will confirm whether SysConfig is configuring this pin for analog mode.

    Thank you,

    Luke

  • Hello Luke,

    Thank you for your response. Within Sysconfig, the AGPIOCTRLA register has already been configured for analog mode concerning A16/C16/GPIO28. Despite using SOC4 channel to read data from A16, there's an issue; it consistently displays high data (0x0FFF). Could you kindly confirm whether the TMS320F2800157 controller supports self-triggering ADC interrupts? Additionally, I'd appreciate guidance on the appropriate SOC channel to utilize for reading data from A16.

    AGPIOCTRLA enable registers

    Regards & Thanks

    Siva Kumar 

  • Hello Siva,

    Please also confirm that GpioRegs.GPAAMSEL[28] is set to 1 to enable analog mode for GPIO28. This pin is different from A4 because it is an AGPIO (meaning it has both GPIO and analog input functions). A4 is an AIO pin (analog only).

    Note that this pin is connected to the SCIA function on the LaunchPad and ControlCARD, so if you're using those boards you may want to consider a different input pin.

    Best regards,
    Ibukun

  • Hello Ibukun,

    1. Currently, the A16 pin is functioning, but it is only receiving data on the SOC0 channel. When configured with the remaining SOC channels, it does not work.

    2. Could you kindly confirm whether the TMS320F2800157 controller supports self-triggering ADC interrupts?

    Thanks & Regards,

    Siva Kumar

  • Hello Siva,

    F2800157 supports self-triggering interrupts like other F28x devices in its class. This is how you would configure it in SysConfig:

    Make sure that the ADC is configured to issue interrupt pulses at the end of conversion - 

    The interrupt can only be triggered by one SOC, and will be issued at the end of that SOC. However, any number of SOCs can be triggered by one interrupt signal. Similar to the SOC trigger (e.g. EPWM SOCA), you can have one trigger for multiple SOCs. In that case, the conversions happen in order according to round-robin priority, unless one of them is a high-priority SOC. If you have a high priority SOC that is in a re-trigger loop from the interrupt, then the remaining round-robin priority SOCs will forever remain pending because a pending high priority SOC will always take precedence over the others.

    Best regards,
    Ibukun

  • Hello Ibukun,

    Thanks for reply, this is resolved already.