This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

firmware update without button press?

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

bootloader_error.png

Parents
  • @Balaji:

    • Note that the bootloader was made for the Development kit, so you need to modify the button GPIO pin to match with the button on the PCA10001.
    • From the error in your screenshot, I suspect that the firmware on the dongle was not up to date. Please install the newest Master Control Panel with APIs (v3.5) and flash the PCA10000 dongle with MEFW_nRF51822_0.8.0_firmware.hex file.

    If the issue remains, please upload your bootloader and the application code you use.

  • Thanks for your reply, now it is working fine for me, i dont know what is the exact cause of that problem, but what i recognized is, that problem is because of both dongle and the evaluation boards are connected in same pc. And now, i can also able to enter into the dfu mode by writing a particular characteristics.

Reply
  • Thanks for your reply, now it is working fine for me, i dont know what is the exact cause of that problem, but what i recognized is, that problem is because of both dongle and the evaluation boards are connected in same pc. And now, i can also able to enter into the dfu mode by writing a particular characteristics.

Children
No Data
Related