-
Notifications
You must be signed in to change notification settings - Fork 333
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
[DFU] BootloaderDFU doesn't allow entering bootloader from software when using BOOTRST #150
Comments
Sorry, I meant to look at this weeks ago, but completely forgot about the Github notification. Looks like there is indeed an issue here. The logic is supposed to be:
In both cases, the magic key is only supposed to be internal to the bootloader - the user application needs the same mechanism to ensure that it can jump to the bootloader after a fresh start from a watchdog reset, in case BOOTRST isn't set. I think we need to use a different magic key in the user application jump example to indicate it should enter the bootloader after a watchdog reset, so it doesn't conflict with the bootloader's magic escape key. That would solve the immediate issue I think and not require existing units in the field to be upgraded with an external programmer. |
Okay, I think I understood that, and have updated my PR, however, I'm unsure of how I'd manage to ensure that the variable access in the application, lives in the same RAM address as the one checked in the bootloader. Any clues on how I'd go about that? |
Hey there, I'm working on getting BOOTRST and reset source detection working for entering bootloader on a qmk based keyboard qmk#5
In that process, I noticed that the example given here: http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
and the check in BootloaderDFU.c seem to be opposit of each other:
lufa/Bootloaders/DFU/BootloaderDFU.c
Lines 136 to 154 in 6d90773
It seems the example uses the magic key to enter the bootloader, while the bootloader uses it to exit the bootloader.
Additionally, it seems with this check, if using BOOTRST fuse, that the only way to enter bootloader is through an external reset, and not reachable via a watchdog timer reset.
Am I correct in assuming that this is not the intended behavior?
As I read the code DFU bootloader, the magic key is used to exit the code, which is fine, however in that case I think the mentioned check should be changed to:
I have opened a PR with a suggestion on this solution. Here: #151
The text was updated successfully, but these errors were encountered: