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

DFU not working from application

Hi, I loaded S110 v8 to nrf51. Then I loaded dfu_dual_bank_ble_s110_pca10028 bootloader.

With this setup, I'm able to download my application via the bootloader.

The problem is: When I trigger bootloader from my application, it almost immediately resets back to my application.

I examined that the bootloader is launched (main function of dfu_dual_bank_ble_s110_pca10028) with NRF_POWER->GPREGRET = 0xB1 which is correct.

bootloader_dfu_start() function in bootloader is called however, something inside the function causes reset almost immediatelly after the function is entered.

Can you please help?

Bootloader project: dual_bank_ble_s110.zip

  • I'm now able to launch bootloader from my application. However, I'm not able to receive any advertisement from the bootlaoder when launched from the application (I know it is probably directed advertising). The problem may be in my central application. So after DFU_TIMEOUT_INTERVAL the bootloader launches application again. However, the application then ends with hardfault, probably in ble_advertising_start() function. I have to reset the chip, then my application works as expected.

  • I can see that the hardfault application crash has something to do with PWM which I use in my application. I tried to add app_pwm_uninit() call before application launches bootloader, but with no effect.

  • I'm trying to upload my firmware via Master Control Panel on Win10 and nrf51 dongle. I started with softdevice 8.0.0 and dual bank bootloader loaded in my nrf51822. I'm able to discover DfuTarg and then load my firmware to it. Then I can see my device with dfu support is advertising. Then I tried to upload firmware again (in this scenario, the bootloader is launched from the application, of course). The firmware was loaded as indicated by Master Control Panel. However my device is stuck and it doesn't advertise. I have to power reset it and then it starts to advertise again as DfuTarg. So instead of updating my application, I ended with DfuTarg with no application loaded. After that, I can load m application via DfuTarg and then again, next firmware upload will fail.

  • The same procedure done with pca10028, dfu\bootloader\pca10028\dual_bank_ble_s110 bootloader and ble_peripheral\ble_app_hrs\pca10028\s110_with_dfu\ application is as expected. Can't be my problem related to my hardware, which is nrf51822 QFAAH00 on Raytac MDBT40 module? Can you please describe, how to port dfu\bootloader\pca10028\dual_bank_ble_s110 bootloader to nrf51822 and how to port ble_peripheral\ble_app_hrs\pca10028\s110_with_dfu\ application to nrf51822?

  • Updating my application loaded in pca10028 also ends with stucked application after the update. I have to power cycle the board and then my device starts advertising (not DfuTarg). This problem may be related to the PWM issue described later.

Related