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

nrf52840 DFU regarding.

Hi Team,

I am developing a low power application where we need to update Firmware frequently based on use cases.

I have successfully tested BLE secure DFU example and would like to implement the same in our product(OTA). 

The desired flow is when I press two of my app buttons for 5 secs the device must enter DFU mode. What I am planning is to 

use a single flash memory as a flag used by application and DFU program. So after the device resets(softreset by app),

the DFU program will check the flash memory flag and decides to stay in boot mode or to enter into the application(similar to DFU button check).

Is it a proper approach or is there any dedicated example to implement the same workflow.

Thanks in advance.

Vishnu.

Parents
  • Hi,

    The simplest way to implement this is using the SDK bootloader, and trigger DFU mode from the application by writing to the retention register before resetting the device to enter DFU mode. This is the same approach that is used by the buttonless DFU example, where this is implemented in the DFU service, specifically in ble_dfu_buttonless_bootloader_start_finalize() in components\ble\ble_services\ble_dfu\ble_dfu.c. You can see that this is checked in the bootloader implementation in dfu_enter_check() in components\libraries\bootloader\nrf_bootloader.c.

Reply
  • Hi,

    The simplest way to implement this is using the SDK bootloader, and trigger DFU mode from the application by writing to the retention register before resetting the device to enter DFU mode. This is the same approach that is used by the buttonless DFU example, where this is implemented in the DFU service, specifically in ble_dfu_buttonless_bootloader_start_finalize() in components\ble\ble_services\ble_dfu\ble_dfu.c. You can see that this is checked in the bootloader implementation in dfu_enter_check() in components\libraries\bootloader\nrf_bootloader.c.

Children
Related