-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
SoC: stm32c0 support #3174
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
SoC: stm32c0 support #3174
Conversation
nmunnich
left a comment
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.
Code looks alright at a glance, not delving too deeply.
docs/docs/config/system.md
Outdated
| | `CONFIG_ZMK_DBL_TAP_BOOTLOADER` | bool | Enable the double-tap to enter bootloader functionality | y if STM32 or RP2040/RP2350 | | ||
| | `CONFIG_ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS` | int | Duration (in ms) to wait for a second reset to enter the bootloader | 500 | | ||
|
|
||
| ### STM32 nBOOT_SEL Option Byte Setup |
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.
This feels like it should be a subsection of the bootloader section. Although considering the new magic value bits aren't documented under configuration, I wonder if we should have a bootloader section separate from system under config?
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.
Yeah, I'm happy to refactor and make a dedicated "Bootloader Integration" config page, if that's what you were suggesting.
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.
Fixed your other comments, will do this extraction/refactor once you respond if that was in fact your suggestion. Thanks!
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.
Yeah, that is indeed what I am suggesting.
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.
New page preview is up: https://deploy-preview-3174--zmk.netlify.app/docs/config/bootloader
8c4d2c6 to
e0b01e1
Compare
nmunnich
left a comment
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.
Couple typos, LGTM otherwise.
Pull in ZMK fork of hal_stm32 with USB device driver fixes for stm32c0.
Newer STM32 C0 and G0 series SoCs do not by default allow use of the BOOT0 pin/button to enter the bootloader once something has been flash to the device, which is a change from previous series, and usually not what's wanted for keyboards running ZMK. To address this, add some optional, but default initialization code to check the nBOOT_SEL bit and override it if necessary to ensure BOOT pin/button functionality.
1c73348 to
2f5aaf7
Compare
Pull the bootloader intergration options out of the system configuration page into their own dedicated one. Co-authored-by: Nicolas Munnich <98408764+nmunnich@users.noreply.github.com>
2f5aaf7 to
439f637
Compare
Small changes needed to support stm32c0
You can see a test module that works with this here: https://github.com/petejohanson/stm32c0pad-module
PR check-list