AnsweredAssumed Answered

imx.6 GPIO

Question asked by Antonio Ake on Oct 25, 2012
Latest reply on Mar 14, 2017 by Francois Killeen
Branched to a new discussion

Hi,

I am using sysfs(linux L3.0.15_12.04.01_ER_source)  to set a GPIO as an output with the following commands:

echo 163 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio163/direction

echo 1 > /sys/class/gpio/gpio163/value

 

I measured the output voltage and it works correctly. The problem is that when I do cat "/sys/class/gpio/gpio163/value". It always returns 0. Any ideas?

 

I was digging through the gpio driver and the gpio value is read from  GPIO_PSR. If I read GPIOX_PSR with memtool also returns 0. Reading GPIO_DR returns the correct value. I am new to the imx.6 family. Is this normal?

 

Thanks,


Outcomes