-
Notifications
You must be signed in to change notification settings - Fork 6.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
nucleo_g0b1re: Swapping image in mcuboot results in hard fault and softbricks the device #37389
Comments
@ycsin, |
Yup I noticed this just now, but so far I only found that the wait idle function needs to be updated as the G0X variant only checked BSY1 while the dualbank variants have BSY1 & BSY2. Haven't read through the G0B1 reference manual though. |
Thanks @str4t0m :-) |
#37480 will address this issue. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Pending #37480, please remove stale |
Describe the bug
On STM32G0B1RE devices,
mcuboot
image upgrade (swapping) would result in hard fault and the device will not be able to boot again. This initially occurs on my g0b1 custom board, which can be debugged using a Segger Jlink. I also verify this on thenucleo_g0b1
tree board, which ended in the same condition albeit can't verify that it is also a hard fault as there seems to be no easy way to debug it.To Reproduce
Steps to reproduce the behavior:
nucleo_g0b1re
boardmgmt/smp_svr
sample on thenucleo_g0b1re
boardmcumgr
to upload ahello_world
image and performimage test
You should see something like this:
And it just stay here forever and can't boot into the bootloader (bootloader likely corrupted) anymore even after reset. If the bootloader is reflashed (but the application isn't), then it will repeat the whole thing again. To boot into the bootloader again, a full chip erase is required.
After some debugging the hard fault seems to occurs at when the bootloader is erasing the flash of the device here.
Expected behavior
The mcuboot should be able to finish the swapping of the image.
Impact
Unable to perform DFU.
Environment (please complete the following information):
Additional context
To compile the bootloader for the nucleo board, I declared a scratch partition in the dts like so:
The
smp_svr
image is signed and confirmed.The text was updated successfully, but these errors were encountered: