-
Notifications
You must be signed in to change notification settings - Fork 226
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
Teensy 4.1: implement USB remote wakeup #345
base: chibios-21.11.x
Are you sure you want to change the base?
Conversation
Without this change, the Teensy 3.6 (with QMK firmware) can wake a computer from Suspend-to-RAM, but the keyboard does not actually produce any keypresses until you un-plug and re-plug it. A similar change was needed for the Teensy 4.x as well: ChibiOS#345 related to qmk/qmk_firmware#16934
Without this change, the Teensy 3.6 (with QMK firmware) can wake a computer from Suspend-to-RAM, but the keyboard does not actually produce any keypresses until you un-plug and re-plug it. A similar change was needed for the Teensy 4.x as well: ChibiOS#345 related to kinx-project/kint#59 related to qmk/qmk_firmware#16934
I converted this PR to a draft for now, because I noticed that on a different PC, with this change, the keyboard seems to not work after suspend/resume (when the resume is not triggered by the keyboard). Will need to investigate. |
Did some initial investigation: the symptom is that when the PC resumes from suspend-to-RAM, it resets all devices connected to my USB hub, and the keyboard does not enumerate any longer. Unfortunately, as soon as I compile in printf_debug in This indicates it’s either a missing delay somewhere, a race condition/timing issue, or adding extra sleeps papers over the issue. In any case — very annoying to figure out :( I’ll see if I can find some time to set up my NXP devkit to see if anything obvious shows up in a debugger. |
When running it on the NXP devkit, the issue doesn’t reproduce :( Worse, in my current testing, waking the PC up via USB didn’t work anymore! I have a https://www.crowdsupply.com/great-scott-gadgets/luna ordered, so when/if it ships I might give this another look, but for now I’ll give up on this. I don’t have the right tools to effectively debug this. |
Actually, one thing came to mind: I think my hack to use I’ll try to give this a shot over the weekend |
This allows waking up a computer from Suspend-to-RAM by pressing a key on the keyboard (with the QMK keyboard firmware, which uses ChibiOS for the Teensy).
0f47fb7
to
fd8650e
Compare
I have updated the code to convert milliseconds to cycles to fix the delay timing, but unfortunately the “hanging USB enumeration” symptom still happens :( |
This allows waking up a computer from Suspend-to-RAM by pressing a key on the keyboard (with the QMK keyboard firmware, which uses ChibiOS for the Teensy).
related to kinx-project/kint#59
related to qmk/qmk_firmware#16934