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, OK, I added these lines: NRF_TIMER1->TASKS_STOP = 1; NRF_TIMER1->TASKS_SHUTDOWN=1; NRF_TIMER1->EVENTS_COMPARE[0]=0; NRF_TIMER1->EVENTS_COMPARE[1]=0; NRF_TIMER1->EVENTS_COMPARE[2]=0; NRF_TIMER1->EVENTS_COMPARE[3]=0; NVIC_DisableIRQ(TIMER1_IRQn); in reset_prepare() function in my application. Then it seems I'm more or less able to update my application (bootloader launched from application). Can you please explain why I have to do this and why the app_pwm's disable/uninit functions don't care of this? Is that documented anywhere?

Reply
  • So, OK, I added these lines: NRF_TIMER1->TASKS_STOP = 1; NRF_TIMER1->TASKS_SHUTDOWN=1; NRF_TIMER1->EVENTS_COMPARE[0]=0; NRF_TIMER1->EVENTS_COMPARE[1]=0; NRF_TIMER1->EVENTS_COMPARE[2]=0; NRF_TIMER1->EVENTS_COMPARE[3]=0; NVIC_DisableIRQ(TIMER1_IRQn); in reset_prepare() function in my application. Then it seems I'm more or less able to update my application (bootloader launched from application). Can you please explain why I have to do this and why the app_pwm's disable/uninit functions don't care of this? Is that documented anywhere?

Children
No Data
Related