Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15.3.0 bootloader bugs? (nrf_bootloaderc)

Hello ...

Our product uses a secure bootloader based on the SDK 15.3.0 secure_bootloader dfu example. I've found a few posts eluding to bugs and would like to confirm whether or not fixed in 15.3.

This one appears to be fixed:

https://devzone.nordicsemi.com/f/nordic-q-a/38048/bug-in-how-bootloader-treats-gpregret

This on appears not to be fixed:

https://devzone.nordicsemi.com/f/nordic-q-a/39477/dfu-enter-check

The poster suggested the solution:

(NRF_BL_DFU_ENTER_METHOD_GPREGRET && (nrf_power_gpregret_get() & BOOTLOADER_DFU_START) == BOOTLOADER_DFU_START)

Is this an appropriate fix?

Also, see this proposal from a couple years ago:

https://devzone.nordicsemi.com/f/nordic-q-a/36601/gpregret-and-nrf_bootloader-c-evolution-proposal

Resolved in SDK 15.3.0?

Many thanks,

Tim

Parents
  • Hi Tim,

    • The reported issue about how GPREGRET is checked in dfu_enter_check() is not fixed. So the current implementation will start DFU mode if any of the bits in BOOTLOADER_DFU_START are set. This is clearly a bug and has been reported, but I do not see it having any practical consequences. The suggested fix is appropriate and can be used if you want to fix it.
    • The reported bug about clearing all of GPREGRET when clearing BOOTLOADER_DFU_START in dfu_enter_flags_clear() is fixed in SDK 15.3.

    These GPREGRET related bugs are only relevant if you use the GPREGRET register for something else in addition to the bootloader. If you do not, you can ignore it. If you do, you should implement the suggested fix.

Reply
  • Hi Tim,

    • The reported issue about how GPREGRET is checked in dfu_enter_check() is not fixed. So the current implementation will start DFU mode if any of the bits in BOOTLOADER_DFU_START are set. This is clearly a bug and has been reported, but I do not see it having any practical consequences. The suggested fix is appropriate and can be used if you want to fix it.
    • The reported bug about clearing all of GPREGRET when clearing BOOTLOADER_DFU_START in dfu_enter_flags_clear() is fixed in SDK 15.3.

    These GPREGRET related bugs are only relevant if you use the GPREGRET register for something else in addition to the bootloader. If you do not, you can ignore it. If you do, you should implement the suggested fix.

Children
Related