How to correctly configure nRF Connect SDK for DFU over UART

Hi, 

I'm using an nRF52832 board that will be programmed with HCI-UART firmware (from the examples in nRF Connect SDK).

The board is a custom board, I've already performed the board porting for Zephyr OS and I'm already able to use the HCI-UART example on my custom board.

Now, I would like to be able to upgrade the firmware of the board in future, so I would like to have a bootloader (just a simple immutable bootlader, I do not need upgradeable bootloader such as MCUBoot).

The DFU procedure should be performed over UART, and I would like that the device will enter in DFU mode using a pin.

I've already done all these stuff using the plain nRF5 SDK (with Nordic SoftDevice-S132, using Nordic DFU etc.), but with the nRF Connect SDK I really cannot understand (from the online documentation), how to reach this target configuration.

Could you please help me finding some examples on how to configure the nRF Connect SDK to have a setup like the one previously explained?

Parents Reply Children
  • Hi Amanda,

    In general, the nRF Connect SDK uses MCUboot for its bootloader.

    yes, I've read the docs, but is it possible to use NSIB without McuBoot, if I just want a simple bootloader that doesn't need to be upgraded?

    I'm approaching to the nRF Connnect SDK from the nRF5 SDK, where the bootloader is also the component that performs the DFU procedure (via BLE or UART).

    In nRF Connect SDK, is NSIB capable of performing full DFU procedure through UART?

    If yes, where should I specify the DFU transport layer (BLE / UART)?

    How can I tell the main firmware to switch in bootloader mode? In nRF5 SDK we have macros such as NRF_BL_DFU_ENTER_METHOD_BUTTON, NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN  or  NRF_BL_DFU_ENTER_METHOD_GPREGRET that I can use to choose in which way start the bootloader.

    In these examples:

    ee my colleague's example updatable_bootloader.

    I can't find any reference to pins used to switch in bootloader mode, nor I can understand how the new firmware will be loaded on the device... BLE, UART...?

  • Hi,

    Samuele Forconi said:
    but is it possible to use NSIB without McuBoot, if I just want a simple bootloader that doesn't need to be upgraded?

    Depends on how you update the NSIB. See this nsib_simple for updating without mcuboot. If you would like to update via uart, it requires mcuboot as this nsib_mcuboot_smp sample.  

    Samuele Forconi said:
    where the bootloader is also the component that performs the DFU procedure (via BLE or UART).

    It's Simple Management Protocol, SMP. See the SMP Server Sample and  Add DFU support to your application guide

    Samuele Forconi said:

    In nRF Connect SDK, is NSIB capable of performing full DFU procedure through UART?

    If yes, where should I specify the DFU transport layer (BLE / UART)?

    No, NSIB doesn't support SMP updates. See Bootloaders and Device Firmware Updates

    Samuele Forconi said:
    How can I tell the main firmware to switch in bootloader mode? In nRF5 SDK we have macros such as NRF_BL_DFU_ENTER_METHOD_BUTTON, NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN  or  NRF_BL_DFU_ENTER_METHOD_GPREGRET that I can use to choose in which way start the bootloader.

    See Enter Serial Recovery Mode, and this sample mcuboot_serial_recovery_uartTo activate the Serial Recovery Mode, hold Button 1 while restarting the DK with that sample. 

    -Amanda H.

Related