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

Parents
  • So, my final finding is that my whole problem is caused by app_pwm module I use in my application. When I don't call functions: app_pwm_enable(), app_pwm_channel_duty_set() in my application, then bootloader works all the time. When I call either function then updating my applicaton from bootloader triggered from application ends with freezed bootloader. Then when I do power cycle, I can see DfuTarg device advertising. Then after dfu timeout I can my newly updated application running. However, after another power cycle, dfu runs again. Please provide information how to use app_pwm module in conjuction with bootloader. Obviously, calling app_pwm_disable and app_pwm_uninit in reset_prepare() of main.c file isn't sufficient. This doesn't solve my issue.

Reply
  • So, my final finding is that my whole problem is caused by app_pwm module I use in my application. When I don't call functions: app_pwm_enable(), app_pwm_channel_duty_set() in my application, then bootloader works all the time. When I call either function then updating my applicaton from bootloader triggered from application ends with freezed bootloader. Then when I do power cycle, I can see DfuTarg device advertising. Then after dfu timeout I can my newly updated application running. However, after another power cycle, dfu runs again. Please provide information how to use app_pwm module in conjuction with bootloader. Obviously, calling app_pwm_disable and app_pwm_uninit in reset_prepare() of main.c file isn't sufficient. This doesn't solve my issue.

Children
No Data
Related