I have a switch at D5 pin of imx6ul evk. I want read D5(gpio2 21) state. Since it's D5(gpio2 21) then it showuld be (2-1)*32 + 21 = 53 gpio53. When I try read it's value using following method
echo 53 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio53/direction
cat /sys/class/gpio/gpio53/value
it shows 0 but if I use multimeter to measure voltage at this pin then multimeter shows high. So shouldn't cat /sys/class/gpio/gpio53/value show 1?
Hi Pratyush
seems there is confusion as pin D5 is nand_wp (gpio4 11),
while gpio2 21 is sd1_data2 (B1)
Schematics (1)
Design files, including hardware schematics, Gerbers, and OrCAD files. (REV 0)
i.MX6UltraLite Evaluation Kit|NXP
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------