Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power management: Use wakeup instead of polling #25

Open
ah- opened this issue Mar 6, 2018 · 0 comments
Open

Power management: Use wakeup instead of polling #25

ah- opened this issue Mar 6, 2018 · 0 comments

Comments

@ah-
Copy link
Owner

ah- commented Mar 6, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant