Pretty much it's the title. Why is no longer permited use the GPREGRET register to decide whether if boot in the bootloader or app?.
Pretty much it's the title. Why is no longer permited use the GPREGRET register to decide whether if boot in the bootloader or app?.
The new Secure DFU bootloader released in SDK 12.0.0 does not yet have any production quality buttonless support. The experimental buttonless example was implemented using a flag in the DFU settings flash page to indicate that DFU mode should be entered upon reboot. This is likely to change to use GPREGRET in the production version, but the decision has not yet been made final. It might depend on implementation details such as how the bond sharing between bootloader and application is eventually implemented.
You may set your own conditions for when to stay in bootloader mode, like reading GPREGRET, by implementing a function nrf_dfu_enter_check(void). The function implementation in nrf_dfu.c is weak to facilitate such custom conditions.
Great, thanks for the aclaration Holmgren
Thanks Holmgren for the update. Is there a timeline for the signed DFU to enter production state? As the GPREGRET function needs adaptions in the nrf_dfu_enter_check function the bootloader itself will require a change to work with the upcoming buttonless DFU feature. Having a rough timeline would allow us to decide if using the signed DFU is a good decision at the moment.
I am not in a position where I can promise any timeline, but I would expect buttonless to be production quality within a couple of months.
The bootloader with secure DFU, bootloader_secure in the SDK, is already in production state. The buttonless example on the other hand is not production quality.
This means that if your application triggers DFU through physical manipulation of the device, such as a button press, Secure DFU is ready for production use. If your application triggers DFU over the air by writing to a control point, you will need to implement and verify such a solution yourself or use the non-secure bootloader available in SDK 11. The buttonless example might be a reasonable starting point, but it is not formally verified and delivered as is.
Holmgren, do you have any updates on this? I'd like to modify my code to use the GPREGRET approach, and I was wondering if you have any specific information to share or a newer version of the example code I could reference.