fsm: sleep ticks interfere with button presses?

Bug #1803918 reported by Selene ToyKeeper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Flashlight Firmware Repository
New
Medium
Unassigned

Bug Description

While testing a new blinking aux LED mode, I occasionally found that the light would ignore a button press during standby. I think there may be some sort of timing-specific interaction between the sleep tick mechanism and the button press handler.

I didn't notice it until I modified the standby timing so it would tick every 0.128 seconds instead of every 0.512 seconds. I also haven't been able to make it fail on purpose, but I suspect it should become easier to trigger by setting the WDT to tick as fast as possible.

I haven't looked in detail yet, but at a guess, I think the issue might happen only when the button press coincides exactly with the brief period of awakeness during a sleep tick. It has some logic to not run the usual code while asleep, and it might sometimes be skipping that stuff when it shouldn't.

OTOH, not fixing this helps keep standby power down, and it only happens rarely. If it turns out to be tricky or expensive to solve, it may not be worthwhile.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.