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?

Parents
  • 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);
    }
    
Reply
  • 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);
    }
    
Children
No Data
Related