Skip to content

Power management: Use wakeup instead of polling #25

Open
@ah-

Description

Right now there is a global timer that continuously scans which keys are pressed and sends out HID reports based on that.

The keys are all wired up so key presses can fire external interrupts that wake up the STM32.
The bootloader even leaves it in a half-enabled state, which is why we have all the EXTI handlers in https://github.com/ah-/anne-key/blob/master/src/main.rs#L177

To enable wakeups we probably need to configure the EXTI registers correctly and then set up the keyboard matrix gpios correctly so that pressing a key pulls an EXTI line up/down.

Once this works it'll be really helpful for power management so we can sleep when noone is using the keyboard. We might even want to consider only running off those interrupts and getting rid of the timer altogether?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions