Skip to content
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

Fixed MCUBoot for SPI hanging, manual firmware rollback #25

Merged
merged 19 commits into from
Sep 18, 2020
Merged

Conversation

lupyuen
Copy link
Owner

@lupyuen lupyuen commented Sep 18, 2020

MCUBoot fixed for SPI Bus corruption...

  1. In case of Non-Maskable Interrupt (e.g. assertion failure) and Hard Fault, blink 4 times quickly and reboot.

  2. Assertion failure may be due to SPI Bus corruption, which causes SPI Flash access to fail in spiflash_identify() in repos/apache-mynewt-core/hw/drivers/flash/spiflash/src/spiflash.c. Rebooting fixes the SPI Bus corruption.

    See Bootloader does not start properly after a watchdog reset/incoherent SPI state #24

  3. Why blink before rebooting? So that we introduce a delay before rebooting, to prevent reboot looping. If PineTime flashes continuously for a long time, it means that the bootloader is stuck in a reboot loop, possibly due to faulty hardware.

  4. Also fixes the checking for manual firmware rollback. Now we need to press and hold at least 1 second, to prevent accidental rollback. During rollback, the screen blinks slowly 4 times before rebooting.

@lupyuen lupyuen merged commit f5db313 into master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant