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

[gen 3] [bootloader] External flash sleep refactoring #1799

merged 1 commit into from May 29, 2019


Copy link

commented May 29, 2019


We've introduced an incompatibility in the bootloader with older versions of system firmware in the releases containing #1725.

When you have a bootloader that has this feature on your device, before we jump into the system-part1 the QSPI flash is put into low power mode and requires a special command to wake it up. So, when you have a system-part1 that doesn't send that special command, the QSPI flash is left in low power mode and anything dealing with it fails, e.g. filesystem.


This PR does a couple of things:

  1. External QSPI flash is no longer implicitly being put into lower power mode when executing hal_exflash_uninit(). This call only disables the QSPI peripheral on nRF52840.
  2. External flash sleep functionality has been decoupled into hal_exflash_special_command() with HAL_EXFLASH_COMMAND_SLEEP and HAL_EXFLASH_COMMAND_WAKEUP commands.
  3. core_hal sleep functions no explicitly call hal_exflash_special_command() to put the external flash into sleep mode.
  4. hal_exflash_init() still implicitly wakes up the external flash, but now through a call to hal_exflash_special_command()

Steps to Test

  1. 0.9.0 + bootloader from this branch shouldn't cause a panic mode
  2. bootlader and system-part1 from this branch shouldn't case a panic mode
  3. Deep sleep and STOP mode sleep tests should pass as previously

Example App



  • [CH33621]


  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to after merging (add links to docs and issues)

  • [bugfix] [gen 3] [bootloader] fixes SOS 10 when upgrading bootloader first from older system firmware. External flash sleep refactoring #1799

@avtolstoy avtolstoy added this to the 1.2.1-rc.2 milestone May 29, 2019

@avtolstoy avtolstoy requested a review from technobly May 29, 2019

@technobly technobly changed the title [Gen 3] External flash sleep refactoring [gen 3] [bootloader] External flash sleep refactoring May 29, 2019

[nrf52840] exflash: refactors sleep/wakeup into a special command, di…
…sables automatic QSPI flash sleep mode on hal_exflash_uninit()

@technobly technobly force-pushed the fix/bootloader-external-flash-sleep branch from c4936ab to 77b7ed7 May 29, 2019

@technobly technobly merged commit 45dc985 into develop May 29, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@technobly technobly deleted the fix/bootloader-external-flash-sleep branch May 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.