Hi,
Can anyone please tell me the exact way to enter into the bootloader mode by writing some characteristics with specific value.
I tried setting NRF_POWER->GPREGRET register in the sample ble_app_hrs code, whenever the write event with specific handle occurs, 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(); }
And also did changes in 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); }
i got all this info from this forum only, but it is not working for me, please suggest me what i need to do to make it work. Please provide some alternative logic's also.
And in debug session device enters into the dfu mode, but in normal mode it is not working.
Regards, Balaji