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

DFU bootloader doesn't load the my application

I loaded the bootloader on the device and it always advertises as DfuTarg even after loading a application that simply blinks an LED. It doesn't seem to switch to the application after uploading the DFU zip from my phone.

I followed these instructions: devzone.nordicsemi.com/.../

The bootloader I'm using is the bootloader_secure project

arm gcc SDK 12.2 nrf52 sd132

Update @ Hung Bui

I'm using a custom "ble app hrm freertos" project. However, I'm just doing a led flash at the moment just to test. So Yes I'm using SD 132 v3.0.0 which is merged in the app hex file. I've also tried merging in the custom bootloader setting based on the CRC of the custom app and that hasn't worked either. The bootloader I'm using is from examples / dfu / bootloader_secure on SDK12.2. I haven't tried pca10040_debug yet. I haven't been succesful at steping into the bootloader code, but perhaps I need to use pca10040_debug? My setup allows me to step into my custom app fine.public_key.c(/attachment/9b7e0eb43efe055aca6cc7b8e02ab242) I can't seem to attach the private key, but its below.. app_dfu_package.zip

-----BEGIN EC PRIVATE KEY----- MHcCAQEEIFj6TzCah7ghiOTQY/vHGVdqqGN+GDqoey33NXUh4mvmoAoGCCqGSM49 AwEHoUQDQgAEQQ/Zv12AKzXB8tqQSFsvmYNH4yiHdJSMqWhqDnHO9QFtsK2++weB JaZGH5QG6nFPdluL6jgVRq+uS0Gy2c6RMg== -----END EC PRIVATE KEY-----

UPDATE

Here is the RTT log. It appears to be okRTT_Terminal_201703301209.log

Parents
  • The GPIO 16 that is being held low is what is causing the app from running. I removed the GPIO check and now the app runs, but I can't use the DFU anymore. I'm using a custom PCB without a button.

    __WEAK bool nrf_dfu_enter_check(void){
    
     if (nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0)
    {
        return true;
    }
    
    if (s_dfu_settings.enter_buttonless_dfu == 1)
    {
        s_dfu_settings.enter_buttonless_dfu = 0;
        APP_ERROR_CHECK(nrf_dfu_settings_write(NULL));
        return true;
    }
    return false;
    

    }

  • Hi, I'm glad that you found the issue. If you want to enter DFU bootloader without a button you should try the buttonless example. It will write to s_dfu_settings.enter_buttonless_dfu to set it to 1 and then trigger a reset to enter bootloader. Please have a look at the example here.

Reply Children
No Data
Related