-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
IC_TEENSY3_1 board config wakes from sleep successfully #16326
Conversation
This board is for the Input:Club keyboards, and has some Kiibohd-specific code. It should not be used for all Teensy boards. |
Looks like another problem caused by the “fix” in #10088 — that change needed to be effectively reverted for Input Club boards, and that was done in #12870, but the empty replacement for You can try removing void restart_usb_driver(USBDriver *usbp) {
// Do nothing. Restarting the USB driver on these boards breaks it.
} But this will fix the issue only for one specific keyboard. Ideally the original problem that prompted the #10088 hotfix should be found and fixed properly. Apparently the original issue happens mostly on STM32F4x1 chips with USB-OTG, and there is an attempt to do a somewhat dirty fix just for those chips in #14988, but there does not seem to be any movement there for some time. |
I would really like it if both STM32 and NXP (teensy) boards both worked well, but digging that far into the code is way beyond me at this point. I'm just using the onekey as a test harness and framework for building my own keyboard(s). If you've got suggestions for where to look to try to help develop the "real solution", just let me know. I'm not afraid of reading microcontroller manuals. |
So, I removed the "BOARD=", and copied the "restart_usb_driver" into my local board. It works properly on my FreeBSD box, but not on my Mac. The Mac recognizes that the device has connected, but typing doesn't do anything.
|
Is this behavior repeatable? Does the problem with Mac disappear when you are using You can try adding the other piece of code from #define WDOG_TMROUTL *(volatile uint16_t *)0x40052012
void early_hardware_init_pre(void) {
// This is a dirty hack and should only be used as a temporary fix until this
// is upstreamed.
while (WDOG_TMROUTL < 2)
; // Must wait for WDOG timer if already running, before jumping
} (There are no other differences between |
The keyboard works perfectly on the mac with the BOARD = IC_TEENSY_3_1 (which is why I submitted the PR: it worked on mac, BSD, and Linux).
Hmm... Adding the code that you included does not fix the problem on the Mac. The keyboard still works elsewhere, but not on the Mac. I'll have to do some more digging later today. |
Bah! Ignore everything I said about it not working on my Mac. The problem was with the usb hub I use with my mac. So, moving JUST the restart_usb_driver() code into the onekey/teensy_32 works everywhere. |
@@ -16,7 +16,6 @@ | |||
|
|||
#pragma once | |||
|
|||
// TODO: including this causes "error: expected identifier before '(' token" errors | |||
//#include "config_common.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//#include "config_common.h" | |
// TODO: including this causes "error: expected identifier before '(' token" errors | |
//#include "config_common.h" |
Thank you for your contribution! |
Thank you for your contribution! |
Description
The PJRC_TEENSY_3_1 board configuration will wake the computer when it's asleep, but then the keyboard wlll
lock up until it's unplugged and reconnected. Using the IC_TEENSY_3_1 board config fixes the problem. The computer will wake up, and the keyboard will continue to function.
Types of Changes
Issues Fixed or Closed by This PR
Checklist