This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bootloader: DFU Start by Flash content instead of Key operation

Controller: nRF52832-QFAA

Reference project: nRF5_SDK_11.0.0_89a8197/examples/dfu/bootloader/pca10040/dual_bank_ble_s132

Question: The idea is, to store a init_DFU_by_flag into the data flash by the application to initiate the DFU service after RESET. The bootloader has to clear this flag after its recognizing by the erasing of the regarding data page. I guess, the NORDIC-bootloader could use the pstorage raw functions. Exists there a possibility to erase one special data page inside of more than one data page by help of the functions the bootloader uses for the upload of firmware?.

Parents
  • May I ask why don't you want to use GPREGRET retention register to do the task ( as default ) ?

    If you want to use flash to send the command, it's fine. That actually how we did it in our Secure DFU in SDK v12.0 We write to bootloader setting to tell the bootloader to enter DFU mode. pstorage was not used though.

    Note that we prefer to use GPREGRET as it's easier to fall back after you switch to bootloader. For example if there is a problem when updating firmware, you can always reset and come back to the application. If you write to flash, and if the bootloader isn't managed to erase the flash, then you will stuck in bootloader mode, can't go back to normal application.

Reply
  • May I ask why don't you want to use GPREGRET retention register to do the task ( as default ) ?

    If you want to use flash to send the command, it's fine. That actually how we did it in our Secure DFU in SDK v12.0 We write to bootloader setting to tell the bootloader to enter DFU mode. pstorage was not used though.

    Note that we prefer to use GPREGRET as it's easier to fall back after you switch to bootloader. For example if there is a problem when updating firmware, you can always reset and come back to the application. If you write to flash, and if the bootloader isn't managed to erase the flash, then you will stuck in bootloader mode, can't go back to normal application.

Children
No Data
Related