imx6ul GPIO

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6ul GPIO

2,629件の閲覧回数
michaelcarrier
Contributor III

I have the imx6ulevk which is running Linux. I need to toggle a gpio from user space but I am having difficulty. I am attempting to read GPIO1_IO04. Using DVM I can measure 3.2 V on this pin. I then go to linux and and do the following: "cd /sys/class/gpio", "echo 4 > export", "cd gpio4", "echo in > direction", cat value. Cat returns 16, huh?????? 16? Should be 1 or zero. Any thoughts?

ラベル(1)
0 件の賞賛
5 返答(返信)

1,167件の閲覧回数
michaelcarrier
Contributor III

Finally got the GPIOs to work. It was an iomuxc thing in the device tree. Thanks to all.

0 件の賞賛

1,167件の閲覧回数
goiatzmaser
Contributor II

Hi Michael,

I get the same value (16). How did you solve in the device tree?

Regards and thanks,

Goiatz

0 件の賞賛

1,167件の閲覧回数
christophertele
Contributor III

maybe something wrong with cat?

try to open "value" like a document.

try:

nano value

or

vi value

0 件の賞賛

1,167件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

   Try to use the following commands:

echo 4 > /sys/class/gpio/export

echo "out" > /sys/class/gpio/gpio4/direction

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

or

echo 0 > /sys/class/gpio/gpio4/value

Regards,

weidong

1,167件の閲覧回数
LuisCasado
NXP Employee
NXP Employee

Hello,

You can check this thread: https://community.freescale.com/thread/381277

Luis