Bug 14859 - Radio Power Button Bouncing
: Radio Power Button Bouncing
Status: VERIFIED FIXED
Product: SB Radio
Classification: Unclassified
Component: Buttons/Knob
: Include FW version in comment
: PC Windows XP
: P1 major (vote)
: 7.4.1
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-20 09:57 UTC by Diane Lee
Modified: 2009-10-21 10:36 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments
Email (49.26 KB, application/x-download)
2009-10-20 09:57 UTC, Diane Lee
Details
Video from JC (1022.44 KB, video/x-ms-wmv)
2009-10-20 09:59 UTC, Diane Lee
Details
Robustified button debouncing (4.16 KB, text/x-csrc)
2009-10-20 18:36 UTC, Caleb Crome
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diane Lee 2009-10-20 09:57:37 UTC
Created attachment 6176 [details]
Email

Bouncing occurs with Radio Power Button
Comment 1 Diane Lee 2009-10-20 09:59:53 UTC
Created attachment 6177 [details]
Video from JC
Comment 2 Chris Owens 2009-10-20 18:04:39 UTC
*** Bug 14755 has been marked as a duplicate of this bug. ***
Comment 3 Caleb Crome 2009-10-20 18:36:23 UTC
Created attachment 6181 [details]
Robustified button debouncing 

Richard, 
  Please review this fix.  It seems to be robust now.  I've seen the button debouncing with mute as well, and it seems to be gone on both power and mute now.

It no longer tries to play tricks with enabling and disabling the interrupts, nor with changing the sensitive edge.  

Basically, it works thusly:

* set interrupt on falling edge.
* in ISR, figure out which button was pressed, and set timer for callback in DEBOUNCE_TIME jiffies.
* The button state machine runs at an interval of DEBOUNCE_TIME jiffies until the button goes back to IDLE state, at which time the state machine does not continue, and it waits for the next falling edge.
* If the ISR gets a 'bounce' before the button is back in IDLE state, it does not restart the state machine timer.
Comment 4 Caleb Crome 2009-10-20 18:37:08 UTC
Richard, please check out the attached baby_buttons.c.  It's a significant change.
Comment 5 SVN Bot 2009-10-21 02:32:53 UTC
 == Auto-comment from SVN commit #7913 to the jive repo by richard ==
 == https://svn.slimdevices.com/jive?view=revision&revision=7913 ==

Bug #14859
Another try at button debouncing, from Caleb, tested and reviewed by Richard.
Comment 6 James Richardson 2009-10-21 10:12:05 UTC
Chris to validate the fix
Comment 7 Chris Owens 2009-10-21 10:36:37 UTC
This fix works well on my known-bouncy unit.