04-04-2017 11:08 AM
Hi,
I have a problem with my PS GPIO. I've routed them throught EMIO to PMOD and I would like to use it with petalinux.
In /sys/class/gpio I have: export gpiochip906 unexport. I tried to change value of one of the 906-908 gpio but nothing change on PMOD. Also when I cat ./gpio908/value I always have 0.
Here is my dts struct:
&gpio0{ emio-gpio-width = <3>; gpio-mask-high = <0x0>; gpio-mask-low = <0x5600>; };
Where can be a reason of this problem
04-05-2017 06:09 AM
hi @kmbm,
what version petalinux are you use?
take a look at http://www.wiki.xilinx.com/Linux+GPIO+Driver 。
have you export the gpio’s direction?
04-05-2017 10:40 AM
I use petalinux 2016.2.
Yes I set direction. Here Is what i did
export 906 > export cd gpio906 echo out > direction echo 1 > value
The link which you included doesn't help
04-06-2017 06:37 AM
try delete the dts you added.
&gpio0{ emio-gpio-width = <3>; gpio-mask-high = <0x0>; gpio-mask-low = <0x5600>; };
04-06-2017 06:56 AM
have you set emio‘s constraint? just like this:
set_property PACKAGE_PIN W15 [get_ports {gpio_0_tri_io[0]}]
set_property PACKAGE_PIN W16 [get_ports {gpio_0_tri_io[1]}]