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.

TMS320F280039C: Driverlib function can not enable AGPIO ADC function

Part Number: TMS320F280039C

Hi expert,

I use the AGPIO and want to enable the ADC function.

But I just found the ADC sample is not right. and the registe  AGPIOCTRLA is not right.

it is still 0, which tells me it is GPIO function. but it should change it to 1 according to the below function

GPIO_setPinConfig(GPIO_20_GPIO20);
// AGPIO -> Analog mode selected
GPIO_setAnalogMode(20, GPIO_ANALOG_ENABLED);

so I just want to hope you can retest the function GPIO_setAnalogMode(uint32_t pin, GPIO_AnalogMode mode) ,check whether it can work or not.

BR

Emma

  • Hi,

    This is bug in the GPIO function. The function uses HWREGH macro which is used to set only the 16 bits of the register. The register is 32-bits wide, and we should be using HWREG macro.

    This issue will be fixed in the upcoming release. As a workaround, please update the function to use HWREG.

    Regards,

    Veena