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

NRF52832 DFU problems

Why each time to upgrade your program need to manually reset chips to run at a time, I use a software reset, but no effect?

Parents Reply Children
  • Hi Hung Bui,

    The SDK version is V11. I in official Bootlader program to modify some of the program, modify parts as follows: if(*p0==0x55667788) dfu_start=true; else dfu_start=false; //dfu_start |= ((nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0) ? true: false);

    if(dfu_start )//||(!bootloader_app_is_valid(DFU_BANK_0_REGION_START)))
    {
    		  *p0=0;
        //nrf_gpio_pin_clear(UPDATE_IN_PROGRESS_LED);
    
        // Initiate an update of the firmware.
        err_code = bootloader_dfu_start(); 
        APP_ERROR_CHECK(err_code);
    
        //nrf_gpio_pin_set(UPDATE_IN_PROGRESS_LED);
    }
    else if(!dfu_start)
    //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);
    }
    

    When I want to upgrade, I have already wrote in the specified flash 0 x55667788, can now normal upgrade, just after the upgrade need to manually reset the development board, is this why?

  • Hi Tom,

    I assume that it only requires a reset after you do a DFU update.

    This issue could be from either the bootloader or the application.

    I would suggest to test with the stock bootloader to see if it's the issue with the modified bootloader or not.

    Secondly, to test if the issue in the application, you can follow this steps to test your application:

    1 - Run your application in debug mode

    2 - Switch to bootloader

    3 - Add a breakpoint in main() in your application

    4 - Do the DFU with the same image as your application

    5 - Check if it run to main() in your application or not.

    You can also use UART trace to check if it managed to jump to application or not.

Related