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

Incorrect Documentation of GPREGRET

In the latest version of the v15.3 nRF SDK, the documentation states bit 1 is used as the flag to enter DFU mode. See below:

// <q> NRF_BL_DFU_ENTER_METHOD_GPREGRET  - Enter DFU mode when bit 1 (0-indexed) is set in the NRF_POWER_GPREGRET register.

However, the bit that flags DFU update is actually bit 0 (0-indexed), shown below:

#define BOOTLOADER_DFU_START_BIT_MASK           (0x01u)      /**< Bit mask to signal from main application to enter DFU mode using a buttonless service. */

This is just documentation, but in addition to the current SDK DFU bugs in DFU enter check and clearing the flags, this does not inspire confidence in the nRF SDK bootloader DFU code.

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

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

Related