-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix USB detection whith bootloader #1
Comments
Maybe power off the usb stack before initializing it, something like regs.cntr.modify(|_, w| w.pdwn().set_bit()); |
Doesn't work, but seems a bit better. |
Thought you might be interested to know, the reason USB doesn't come up at 48mhz is that the USB device needs to to be disabled via APB1ENR before you can successfully change the USB clock. It's still enabled from the bootloader and you can't change the USB clock while it's active. |
Yeah, I find that was caused by the clock. Using 72MHz also do the job fine. |
Just out of curiosity, how are you? Are you using this firmware? |
I’m not. I actually wrote my own FW in rust and then found this bug when I ported it to my Ortho60, then found your repo after that ;). |
Great! Enjoy, and feel free to ask any question, I might have some similar problem in the past ;-) Any link to your firmware? |
You might be interested in TeXitoi/keyberon#14 where you can find some different keyboard implementation in rust. |
I don’t have a link, sadly. I can’t push stuff to github. I made my interrupt driven, though it requires a lot of board specific boiler plate. I also have an extra layer of indirection in the layout so that you can pull common layouts into shared parts (fex. the core QWERTY or Colemak layout keys). I also have a version working on an STM32WB nucleo. I want to see if I can get Bluetooth working. |
Look at https://github.com/rtfm-rs/cortex-m-rtfm if you didn't know already: a really great paradigm for interrupt driven firmware. And really lightweight. |
Yep! That’s what I’m using. The boilerplate in mine comes from having to declare the 3-4 board-specific GPIO/EXTI interrupt handlers and funnel them all into the poll routine. |
No description provided.
The text was updated successfully, but these errors were encountered: