UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer kmbm
Observer
3,776 Views
Registered: ‎01-11-2016

Petalinux gpio

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

Tags (3)
0 Kudos
4 Replies
Explorer
Explorer
3,740 Views
Registered: ‎11-09-2015

Re: Petalinux gpio

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?

 

0 Kudos
Observer kmbm
Observer
3,734 Views
Registered: ‎01-11-2016

Re: Petalinux gpio

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

0 Kudos
Highlighted
Explorer
Explorer
3,711 Views
Registered: ‎11-09-2015

Re: Petalinux gpio

try delete the dts you added.

&gpio0{
    emio-gpio-width = <3>;
    gpio-mask-high = <0x0>;
    gpio-mask-low = <0x5600>;
};

 

0 Kudos
Explorer
Explorer
3,709 Views
Registered: ‎11-09-2015

Re: Petalinux gpio

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]}]

0 Kudos