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

how to Switch between over-the-air and uart bootloader mode?

Hi, How to integrate both over-the-air and uart bootloader application for an device? We have a custom board with nrf51822 chipset, and we need to implement the firmware update process, which can support both over-the-air and usb to uart type firmware update. Since we not yet tested the uart bootloader application, we dont have clear idea on it (like, how to make it enter into the bootloader mode). Can anyone suggest us how to handle this?

our requirement as follows, If the device is connected through the usb, and if the user want to update the firmware, the device should enter into dfu_dual_bank_hci (uart) bootloader mode, and do the firmware update.

And if the device is connected through ble, user should make it enter into the dfu_dual_bank_ble (over the air) bootloader mode by writing some value through the special characteristics created for it, and should do the firmware update.

Regards, Balaji

  • After updating the firmware i didn't have bootloader advertising, i have checked it fully in debug mode, bootloader is executing fine, but when i check for the application, which is updated in debug mode, it hangs sin for loop with the error code 0x0000000B (in ble_debug_assert_handler();)

  • Hi Balaji,

    I have made an example of having both HCI and BLE. If button 6 is pressed bootloader will enter BLE mode, if it is released HCI will be used.

    It's based on SDK v5.0.0, S110 v6.0.0, the application hex file should be compiled from SDK v5.0.0 as well.

    bootloader - BothHCI_BLE.zip

  • Thanks for the sample code Hung Bui,

    I only tested the ble-bootloader, it is working fine. Before testing the uart-bootloader, i need to confirm, how the bootloader select button works. Since i only have the evaluation board with me(which has two buttons conneccted through gpio 16 & 17) i configured the button0(16) as bootloader select button.

    After flashing your application it is entering into the uart-bootloader mode(default), even if i press the bootloader select button it is not entering into the ble-bootloader mode. But if i press after sometime (i didnt calculate the time) it enters into the ble-bootloader mode. I totally confused on it, so i need to confirm it with you that, am i doing anything wrong.

    I need one more help regarding USB - SPI firmware update, can i get sample application for this?

    Regards, Balaji.

  • @Balaji: On the Ev kit you would need to use internal pull up. Please set BUTTON_PULL as NRF_GPIO_PIN_PULLUP instead of NO_PULL

    Could you be more specific on "USB-SPI firmware update" ? Currently only UART firmware update is supported.

  • As i said before we have a custom board with the peripherals like accelerometer, Nor flash, etc.. Our ultimate aim is to collect the data from the accelerometer and store it in Nor flash, when the device is connected to the master (PC or Smart Phone) device need to transfer those data's as per the request received from the master. And also our device should support the usb connectivity with the masters, for uploading the accelerometer data's, and also for updating the device firmware.
    For some other reason's now we cannot able to use the USB (master) to UART(slave) communication. So that we planned to go with USB to SPI communication for both firmware update(master to slave), and data upload (slave to master). So if we get any sample application regarding spi firmware update it will be more helpful for us to solve the above problems.

Related