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.

OMAP 35xx : How to setup GPIO pins as Input and read them?

Other Parts Discussed in Thread: SYSCONFIG, OMAP-L138

I'm trying to setup some GPIO pins as inputs so I can read some data from an external device. I can 'scope the pin and see I'm getting the correct value, but in my software (Linux app), it is not reading the value.

These are the steps I'm using to set up the GPIO

  1. Configure pins as GPIO via the register that controls MUX mode
  2. Setup the GPIO_SYSCONFIG register as appropriate for the individual GPIO modules that are in use
  3. Setup the GPIO OE register. Actually by default, these are configured as INPUT so I should only need to do this for outputs
  4. Set up the GPIO IRQENABLE1, IRQENABL2 and WAKEUP ENABLE registers (I assume write "1" to the appropriate bit).
  5. Setup the GPIO LEVELDETECT0/LEVELDETECT1 registers

Is that it? I'm fairly confident Steps 1-3 are done correctly, as I have some pins set as OUTPUTS and I can see them toggling. TRM says I need to setup as in Step 4, so I assume just enable it. I have read-back these registers and verified that they are set as I think they should be.

However, when I query the GPIO_DATAIN register, I still do not get it registering the actual value that is on the pin. Am I missing anything?