reading gpio interrupt in imx6ul evk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

reading gpio interrupt in imx6ul evk

982 次查看
pratyushtomar
Contributor IV

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?

标签 (2)
0 项奖励
回复
1 回复

608 次查看
igorpadykov
NXP Employee
NXP Employee

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!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复