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

won't reset chip after dfu

FormerMember
FormerMember

Hi,

I am using keil uvision 5.17, SD 130, nRF 51822, dualbank bootloader.


I have programmed own application and merged bootloader, application, soft device.

I can do dfu as many as I want,

but the problem is I should push reset button whenever I finish dfu.

If I don't push reset button, I can't connect with smartphone.


My application have programmed from s130_hrs_with_dfu example,

I removed all of code exept dfu and device manage service.

Which part should I check to fix manual reset problem?

  • The bootloader will jump to the new application without performing a reset, which is the expected behaviour. Are you using one of our nRF Apps to connect to the device or your own app to connect to the device?

  • FormerMember
    0 FormerMember

    Yes, I use nRF Toolbox's DFU service. I tested hrm dfu service, and new application start automatically after dfu. But my own application which include dfu service from hrm service, won't start after dfu if I don't push reset button.

    which part should I check to fix this problem?

  • Are you using the S130 Dual Bank Bootlader as is or have you modified it? I could sound like the problem lies in your app. I would take a look at this page on our Infocenter, it describes all the steps necessary to add the DFU service to an application.

  • FormerMember
    0 FormerMember

    SDK10 bug

    Solution : ..\dfu\bootloader\main.c

    set(if you are using timer1, timer2)

    if (bootloader_app_is_valid(DFU_BANK_0_REGION_START) && !bootloader_dfu_sd_in_progress())
    {
        // Select a bank region to use as application region.
        // @note: Only applications running from DFU_BANK_0_REGION_START is supported.
        bootloader_app_start(DFU_BANK_0_REGION_START);
    }
    

    to

    if (bootloader_app_is_valid(DFU_BANK_0_REGION_START) && !bootloader_dfu_sd_in_progress())
    {
    
        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);
    
        NRF_TIMER2->TASKS_STOP = 1;
        NRF_TIMER2->TASKS_SHUTDOWN=1;
        NRF_TIMER2->EVENTS_COMPARE[0]=0;
        NRF_TIMER2->EVENTS_COMPARE[1]=0;
        NRF_TIMER2->EVENTS_COMPARE[2]=0;
        NRF_TIMER2->EVENTS_COMPARE[3]=0;
        NVIC_DisableIRQ(TIMER2_IRQn);		
    
        // Select a bank region to use as application region.
        // @note: Only applications running from DFU_BANK_0_REGION_START is supported.
        bootloader_app_start(DFU_BANK_0_REGION_START);
    }
    
  • Hi, I am facing the same problem as @TY. I tried the solution mentioned by TY, but still the problem persist. I'm using NRF52832, SDK11, S132 and nRFToolBox android app for OTA DFU. The microcontroller hangs after the DFU of bundle containing sd+bl+app. And starts working correctly after a reset, be it power reset or a reset using nrfjprog --reset command.

    After the reset, the problem is gone, i.e. after reset I can OTA DFU as many times I wish and it happens successfully without hanging after DFU. But I have to update numerous devices which are enclosed and if all of them need a reset after the DFU then it is non-trivial job.

Related