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

dfu service echo

I'm trying to update my firmware using the dfu, I tested two examples of the SDK :

one of them is dfu_dual_bank_ble project,

  • I noticed that the memory allocation consists of bootloader part, application part & softdevice part so when I tried to update the firmware it works fine with me, it initilize the service then jump to bootloader and finally it updates the firmware with the new firmware
  • the test of the previous example is done by nrf toolbox & master control panel applications

the second application I tested is the ble_hrs_with_dfu project

  • that application what I need to work on something like that, I noticed that the memory allocation consists of application part& softdevice part only ,no bootloader allocation here, so when I tried to update this firmware it initilize the service with no problem & then trying to jump to bootloader with no gain and it stucked at this point,

is there any way to define the bootloader area in the hrs application ?

or another method to use to be able to update the firmware through the ble_hrs itself ?

if there are any examples or anybody worked on it or made it work just inform me please as I got stucked at this point in my project.

thanks for your great help

Parents
  • Hi mohamed

    Have you followed this guide on how to enable DFU mode from Master Control Panel when using the ble_app_hrs_with_dfu example? There is also a seperate guide here that describes how to include the DFU service in any custom application.

    Generally, the application itself is not aware if there is bootloader on the device or not. The application is flashed at the top of the softdevice, regardless if a bootloader is present or not. All that the DFU service does is to write into GPREGRET register on the nRF51 which is retained when doing a soft-reset. When the DFU service has written to this register, it soft-resets the nRF51. At startup, the bootloader starts by reading the contents of the GPREGRET register to figure out if it should stay in DFU mode or start the application.

    More information is in the further reading section of this DFU tutorial.

    This video is very good for visualizing how the DFU works.

Reply
  • Hi mohamed

    Have you followed this guide on how to enable DFU mode from Master Control Panel when using the ble_app_hrs_with_dfu example? There is also a seperate guide here that describes how to include the DFU service in any custom application.

    Generally, the application itself is not aware if there is bootloader on the device or not. The application is flashed at the top of the softdevice, regardless if a bootloader is present or not. All that the DFU service does is to write into GPREGRET register on the nRF51 which is retained when doing a soft-reset. When the DFU service has written to this register, it soft-resets the nRF51. At startup, the bootloader starts by reading the contents of the GPREGRET register to figure out if it should stay in DFU mode or start the application.

    More information is in the further reading section of this DFU tutorial.

    This video is very good for visualizing how the DFU works.

Children
Related