{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1249","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1249/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1249/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1249/events","html_url":"https://github.com/raspberrypi/linux/issues/1249","id":124738928,"number":1249,"title":"GPIO: polling a keyboard crashes the kernel after an hour or two...","user":{"login":"christophe-dupriez","id":777038,"avatar_url":"https://avatars.githubusercontent.com/u/777038?v=3","gravatar_id":"","url":"https://api.github.com/users/christophe-dupriez","html_url":"https://github.com/christophe-dupriez","followers_url":"https://api.github.com/users/christophe-dupriez/followers","following_url":"https://api.github.com/users/christophe-dupriez/following{/other_user}","gists_url":"https://api.github.com/users/christophe-dupriez/gists{/gist_id}","starred_url":"https://api.github.com/users/christophe-dupriez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophe-dupriez/subscriptions","organizations_url":"https://api.github.com/users/christophe-dupriez/orgs","repos_url":"https://api.github.com/users/christophe-dupriez/repos","events_url":"https://api.github.com/users/christophe-dupriez/events{/privacy}","received_events_url":"https://api.github.com/users/christophe-dupriez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-01-04T11:06:44Z","updated_at":"2016-01-18T14:23:56Z","closed_at":null,"body":"In Python, I poll rows and columns of a numerical keypad using GPIOs without added resistors\r\n(I use the input pullups).\r\nI followed this article:\r\nhttp://www.instructables.com/id/Using-a-keypad-with-Raspberry-Pi/\r\n\r\n***As the bug happens without key presses, one can test on any RPi even without any keypad plugged.***\r\n\r\nThe GPIOs I use for rows and columns are:\r\n    ROW         = [18,23,24,25]\r\n    COLUMN      = [4,17,22]\r\nAfter an hour or two, the kernel crashes badly using either \"Rpi.GPIO\" or \"pigpio\" (pigpio may be a bit longer to crash). The crashes are never the same and even the console frame buffer may be garbled.\r\nI attach the keypadClass.py (.txt to make it accepted by GitHub) and keytest.py\r\nI also attach photos of the Rpi console...\r\n\r\nMy question is: \" what kind of workaroung could I follow to protect the Kernel from crashing when polling a keyboard ? \"\r\n\r\nThanks a lot for your help !\r\n\r\nChristophe\r\n\r\n![a0131](https://cloud.githubusercontent.com/assets/777038/12088418/4d8bc492-b2db-11e5-8cbe-33e5e84f34ee.jpg)\r\n![a0144](https://cloud.githubusercontent.com/assets/777038/12088420/545bce20-b2db-11e5-9db4-d3fa4471b051.jpg)\r\n\r\n\r\n\r\n[keypadClass.py.txt](https://github.com/raspberrypi/linux/files/77059/keypadClass.py.txt)\r\n\r\n[keytest.py.txt](https://github.com/raspberrypi/linux/files/77058/keytest.py.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/172539345","html_url":"https://github.com/raspberrypi/linux/issues/1249#issuecomment-172539345","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1249","id":172539345,"user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:23:56Z","updated_at":"2016-01-18T14:23:56Z","body":"I suspect if you can make your standalone-test-script crash the kernel in a shorter time-period (maybe by doing your mode-switches at a faster rate?) that would be useful too ;-)"}}