Menu

#129 Spurrious Edge Detection after remove/add event detection

Accepted
None
Medium
Patch
2016-10-15
2016-03-01
No

When you use the GPIO.remove_event_detect() in a call-back, and it is activated again just before leaving the call-back, there are spurrious edge detections generated.

The attachement is a snapshot of this happening. The Pulse_Out is the actual signal going to an input pin. The Trigger signal signifies the time spent in the call-back routine. The Error signals the start of an interrupt without a matching input pulse. I suspect this is caused by a Linux event while the activation of the edge detection is taking place.

This error happens in less than 1% of the time but this seems to be depending on the Linux activity happening at the wrong time.

More detailed information can be found here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=133740&p=912158#p912158

1 Attachments

Discussion

  • Ben Croston

    Ben Croston - 2016-10-15
    • status: New --> Accepted
    • assigned_to: Ben Croston
     
  • Ben Croston

    Ben Croston - 2016-10-15

    You cannot currently use add_event_detect or remove_event_detect within a callback. I am currently evaluating a patch which may resolve this issue in 0.6.3.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.