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: 
Highlighted
Participant bgw_bogdan
Participant
1,202 Views
Registered: ‎07-26-2013

no data inside /dev/input/event0 when using gpio keys driver

Hello to all, 

I'm facing this problem for some time and I have already checked forum for the possible solution, but without any luck.

 

I'm using PetaLinux 2017.2, Vivado 2017.2, Ubuntu 16.04 and ZedBoard. My idea was to use MIO 50 (or MIO 51) GPIO pins as a simple push button (interrupt) by using gpio keys driver and I found this example: 

http://www.wiki.xilinx.com/Linux+GPIO+Driver

Everything (at least I hope) is set in the same way as you can find there. I'm using the same application from this example and read() function to detect pressed key event. 

 

When I start Linux and run cat /proc/interrupts I can see that my interrupt is present there. Also, every time I press the button I can see interrupt counter is counting fine. Also, if I go to: /dev/input/ I can see event0

But, if I use cat /dev/input/event0 | hexdump , there is nothing happening in most cases when I press the button. Maybe, once in 100 times (this number is totally random) I get the data inside event0 and my test application detects this event - so, definitely, It's not a debouncing problem, because counters works fine. 

 As

In almost all the cases that I found, there was a problem to get /dev/input/event0 because of wrong definitions inside the device tree, but I have a different problem - I can't read event0 !? 

 

What can be the cause of such behavior? Wrong definition of device tree or something else inside Kernel? I'm not a Linux expert, but this must be a stupid error. 

 

Thanks! 

0 Kudos
3 Replies
Newbie mtemp
Newbie
945 Views
Registered: ‎06-28-2018

Re: no data inside /dev/input/event0 when using gpio keys driver

I have the same problem on a pynq, Ubuntu 16.04, vivado 2017.4

Any ideas? Have you solved the problem?

0 Kudos
Participant bgw_bogdan
Participant
940 Views
Registered: ‎07-26-2013

Re: no data inside /dev/input/event0 when using gpio keys driver

I got the info that this problem is solved in Vivado 2018.1, but I never tried it. If you have time, please try and leave the comment if it's true.  

0 Kudos
Moderator
Moderator
930 Views
Registered: ‎09-12-2007

Re: no data inside /dev/input/event0 when using gpio keys driver

0 Kudos