cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Edgar_lemaire2
Observer
Observer
419 Views
Registered: ‎03-04-2020

Using GPIO with SYSFS - "Edge" is not visible in sysfs after gpio export

Hello,

I am trying to use GPIO to generate interrupts. I am using the sysfs to access and interract with GPIOs from Linux User Space. I am quite used to the use of GPIO with sysfs, but here there is something I don't understand :

I have configured the GPIO in Vivado IP integrator as depicted in the first picture below.

I have connected the GPIO interrupt port to the IRQ port of the ZYNQ as depicted in the second picture below.

I have generated bitstream , exported hardware, configured my petalinux project with the exported hardware (petalinux-config --get-hw-description=<path to hdf> --silentconfig). Then I built the project (I did not modified the kernel configuration, as GPIO_SYSFS and GPIO_ZYNQ were already enabled).

When I boot the Linux on the board, after exporting the GPIO pin (511 in my case), I cannot see the "edge" file in /sys/class/gpio/gpio511/.

 

root@ptlnx:/sys/class/gpio# echo 511 > export 
root@ptlnx:/sys/class/gpio# cd gpio511
root@ptlnx:/sys/class/gpio/gpio511# ls
active_low  device      direction   power       subsystem   uevent      value

 

Does anybody knows if there I missed a step or a configuration ?

 

Regards,

 

EdgarGPIO configuation in VivadoGPIO configuation in VivadoFull design in VivadoFull design in Vivado

0 Kudos
1 Reply
Edgar_lemaire2
Observer
Observer
366 Views
Registered: ‎03-04-2020

Update :

It seems to be related to GPIO width.

I have tried with a 32 Bits All-Input GPIO (with Interrupt enabled), and it works fine. The « edge » setting does appear under /sys/class/gpio/gpio511 after export.

Is there a workaround to use 1-bit GPIO and still access Edge setting from sysfs?

 

Regards,

 

Edgar

0 Kudos