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.

CCS/TMS320C5535: Using GPAIN to read potentiometers

Part Number: TMS320C5535

Tool/software: Code Composer Studio

Hello,

I am currently using the TMS320C5535 eZdsp USB kit for a project, and I am attempting to read in the values from 2 different potentiometers using the GPAIN pins. So far, I have been unsuccessful in my attempts. I have been using a 3.3V across the potentiometer, but reading it in using the CSL functions I have been unable to read any value no matter the setting. I was attempting to read these voltages into GPAIN pin 0. In my code, I am calling functions from the file ezdsp5535_sar.c in my main, and this file calls functions from the CSL, specifically the file csl_sar.c. I attempted to specify which GPAIN pin I wanted to use, by adding this line of code to the ezdsp5535_sar.c file right before the conversion starts:

SAR_GPODirSet(SarHandle, CSL_SAR_GPO_0, CSL_SAR_GPO_IN);

This line of code should tell the handler that this GPAIN pin is an input, but I am not sure the code is working as I think. I was also using this previous forum post as a reference:

https://e2e.ti.com/support/dsp/c5000/f/109/t/537198?ezdsp-c5535-Using-GPAIN-0-3-to-read-pots-

However, it did not appear to ever have a solution so I was unable to follow it further.

Thank you for your time.