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

DFU

Hi,

I expected a bit more fanfare for the BLE-based DFU, but eventually found it in the 4.4 SDK after my sales rep told me it was there ;)

Some questions:

(1) Is there a plan to support DFU over BLE without the need to physically press a button? I get that this could be user implemented, but for something as critical as DFU, we'd rather rely on the vendor's code.

(2) Will there be a sample iOS app any time soon?

Thanks!

-m

Parents
  • I did a small test and it´s working. Don´t know if it´s the best solution but it works for me.

    Change this in the bootloader app. it will still trigger on button 7 put it´s easy to take away.

        if (bootloader_is_pushed || (!bootloader_app_is_valid(DFU_BANK_0_REGION_START)) || NRF_POWER->GPREGRET == 1)
        {
            nrf_gpio_pin_set(LED1);
    	NRF_POWER->GPREGRET = 0;
            // Initiate an update of the firmware.
            err_code = bootloader_dfu_start();
            APP_ERROR_CHECK(err_code);
    
            nrf_gpio_pin_clear(LED1);
        }
    

    Add this in your normal code for tigger bootloader NRF_POWER->GPREGRET = 1; NVIC_SystemReset();

  • I tried as you said, but it is not working. I just modified the ble_app_hrs code as follows, static void on_write(ble_evt_t * p_ble_evt) { ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; if (p_evt_write->handle == 3)
    { NRF_POWER->GPREGRET = 1; sd_nvic_SystemReset(); }

    when i update the device name, it should set the register and reset the device, then the bootloader mode will take place. I also modified the bootloader code as you said. while debugging i can see that the device enters into the bootloader mode, when reset happens. but, when testing with the master control pannel, system reset happens, but it is not entering into the bootloader mode. could you please help me get over this. and also tell me the source file location from where you are entering into the bootloader mode(i.e location to set NRF_POWER->GPREGRET == 1).

Reply
  • I tried as you said, but it is not working. I just modified the ble_app_hrs code as follows, static void on_write(ble_evt_t * p_ble_evt) { ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; if (p_evt_write->handle == 3)
    { NRF_POWER->GPREGRET = 1; sd_nvic_SystemReset(); }

    when i update the device name, it should set the register and reset the device, then the bootloader mode will take place. I also modified the bootloader code as you said. while debugging i can see that the device enters into the bootloader mode, when reset happens. but, when testing with the master control pannel, system reset happens, but it is not entering into the bootloader mode. could you please help me get over this. and also tell me the source file location from where you are entering into the bootloader mode(i.e location to set NRF_POWER->GPREGRET == 1).

Children
No Data
Related