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

How to enter into DFU mode without button press?

Hi,

how to get into the bootloader mode without pressing any button, when some application is running? I also tried it with setting the NRF_POWER->GPREGRET but it is not working. Is there any other way to achieve this?

i changed the 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) // device name handle { NRF_POWER->GPREGRET = 1; sd_nvic_SystemReset(); }

whenever the device update occurs, device should enter into the bootloader mode, i changed the bootloader code as follows,

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);
}

Regards Balaji

Parents Reply Children
Related