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.

AM6422: How to Verify GPI Mode for ADCO Pins on AM6422x EVM

Part Number: AM6422
Other Parts Discussed in Thread: AM6442

Tool/software:

Hi TI Experts,

I’m working on the AM6442 EVM kit and would like to verify if the ADC0_AINx pins can be successfully converted into GPI (General Purpose Input) mode.

To configure all 8 ADC0 input pins (ADC0_AIN0 to ADC0_AIN7) to operate in GPI mode and read their digital output, I referred to the following thread and enabled the GPI mode using devmem2 for one pin (e.g., ADC0_AIN0) by writing to the CTRL_MMR register to select the GPI function.


https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1499711/am6442-configuring-the-adc0-single-pin-as-gpi?tisearch=e2e-sitesearch&keymatch=ADC0%2520AIN0%2520as%2520input#

Steps I’ve Taken So Far:

  • I have configured the GPIO1 bank into the DTS, but I am unable to locate the pins (GPIO1_80 to GPIO1_87) that are listed in the datasheet.
  • Additionally, try using the devmem2 to read the register value for the pins, but a bus error occurred.

Questions:

  1. Verification of GPI Mode:

    • What is the best way to verify if all the ADC0_AINx pins are indeed operating in GPI mode on the AM6422x?

    • Is there a status bit or register that confirms the pinmux mode applied?

  2. Device Tree Configuration:

    • Do I need to explicitly configure GPIO1 in the device tree if I only want to read digital input status from the ADC0 pins via GPI mode?

    • If yes, could you share an example DTS snippet for enabling GPIO1 in input mode?

Your guidance will be helpful for validating our setup and ensuring we follow the correct approach.

Thanks in advance,
Ankit

  • Hi Ankit,

    What is the best way to verify if all the ADC0_AINx pins are indeed operating in GPI mode on the AM6422x?

    Read the GPIO_DIR_XY register to know the direction of Pin(i.e. input/output). 

    Do I need to explicitly configure GPIO1 in the device tree if I only want to read digital input status from the ADC0 pins via GPI mode?

    You can read the pin status by reading the GPIO_IN_DATA_XY register.

    As the ADC pins are tied to GPIO1_[80:87] which lies in the Bank 5. So the value for XY will be 45 for the above case.

    Regards,

    Tushar