-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Add dual-bank STM32 bootloader support #8778
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drashna
approved these changes
Apr 19, 2020
noroadsleft
approved these changes
May 16, 2020
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.
__attribute__ ((weak))
✔️
Don't have any chips that can use this on which to test, but the code looks good to me.
… charge RC circuit.
tzarc
force-pushed
the
stm32-dual-bank-bootloaders
branch
from
July 16, 2020 06:55
398499a
to
6c13d40
Compare
noroadsleft
pushed a commit
that referenced
this pull request
Jul 18, 2020
… charge RC circuit. (#8778)
noroadsleft
pushed a commit
that referenced
this pull request
Jul 26, 2020
… charge RC circuit. (#8778)
noroadsleft
pushed a commit
that referenced
this pull request
Jul 31, 2020
… charge RC circuit. (#8778)
noroadsleft
pushed a commit
that referenced
this pull request
Aug 11, 2020
… charge RC circuit. (#8778)
noroadsleft
pushed a commit
that referenced
this pull request
Aug 27, 2020
… charge RC circuit. (#8778)
noroadsleft
pushed a commit
that referenced
this pull request
Aug 29, 2020
… charge RC circuit. (#8778)
nicocesar
pushed a commit
to nicocesar/qmk_firmware
that referenced
this pull request
Sep 6, 2020
… charge RC circuit. (qmk#8778)
drashna
pushed a commit
to zsa/qmk_firmware
that referenced
this pull request
Sep 30, 2020
… charge RC circuit. (qmk#8778)
kjganz
pushed a commit
to kjganz/qmk_firmware
that referenced
this pull request
Oct 28, 2020
… charge RC circuit. (qmk#8778)
BorisTestov
pushed a commit
to BorisTestov/qmk_firmware
that referenced
this pull request
May 23, 2024
… charge RC circuit. (qmk#8778)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds support for STM32 dual-bank flash bootloaders, by toggling a GPIO during early init in order to charge an RC circuit attached to
BOOT0
.The main rationale behind this is that dual-bank STM32 devices unconditionally execute user-mode code, regardless of whether or not the user-mode code jumps to the bootloader. If either flash bank is valid (and
BOOT0
is low), then the built-in bootloader will skip any sort of DFU.This PR allows for the initialisation sequencing to charge the RC circuit based on the example circuit posted on Discord, effectively pulling
BOOT0
high before issuing the system reset. As the RC circuit takes a while to discharge, the system reset executes the ROM bootloader which subsequently seesBOOT0
high, and starts executing the DFU routines.Tested with STM32L082 (with current QMK+current ChibiOS), and STM32G474 (against ChibiOS 20.x).
Types of Changes
Checklist