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
  • Hi Balaji

    Thanks for the reply .... But I was facing an issue after device firmware update.. When I do a reset using the button on the board the firmware that I updated came up, but when I done a power on reset(detaching and re-attaching board) boot loader came up ,where it was supposed to be the application which I updated . Did you had any such experiences Any idea to solve this issue

Children
No Data
Related