DFU support with UART and/or USB

Hi 

We are working on product where nRF52840 module is used as MCU as well as for BLE functionality.

It is interfaced with main ARM board with USB interface and for other product with UART interface.

We are using MT25QL128ABA Micron NOR flash as external flash.

Our main concern here is to have the firmware upgrade(DFU) of nRF from the iMX part through USB and/or UART.

Can you please suggest how we can proceed with it.

One more thing is we already using USBD functionaly for data transfer from iMX to nRF.

  • Hi,

    We provide bootloaders with USB and UART transport in both the nRF5 SDK and nRF Connect SDK. Which SDK are you using?

    For the nRF5 SDK, we do not provide any official DFU master implementations that are suitable to run on a microcontroller, but there are some unofficial out there which you can use at least as a reference. For the nRF Connect SDK, you typically have an SMP server on the nRF, either in the application or MCUBoot itself (serial recovery), and the host MCU would have to implement a SMP client. If the host MCU in your case is an embedded linux device, you could use the mcumgr command line tool. Or alternatively another SMP client implementation.

  • sorry. I missed mentioning the SDK. We are usinf nRFConnect SDK 2.1.0.

    You mean we can use UART and USB both transports for DFU right?

    Can you provide any sample with these, initially to try on EVK?

    Also steps that need to differ when we move to embedded linux.

  • Hi,

    Srikara said:
    You mean we can use UART and USB both transports for DFU right?

    Yes.

    Srikara said:
    Can you provide any sample with these, initially to try on EVK?

    The simplest is to take a look at the SMP Server Sample. The same sample can be used with a number of different transports by picking the right configuration file (for instance, overlay-cdc.conf for USB, overlay-serial.conf or overlay-serial-console.conf for UART, and so on). This is for implementing the transport in the application. Note that the documentation here describes how to sign images etc. which is relevant with vanilla Zephyr, but when using the nRF Connect SDK this is done automatically with the provided key. Refer to Bootloaders and Device Firmware Updates for more details.

    You can also include serial transports in MCUBoot itself using the serial recovery mechanism if that fits your product better, or you can do both. For an example of that, I suggest you take a look at the unofficial examples my colleague added here.

    Regardless of where you do things, SMP is the protocol used to perform the updates, and you can use mcumgr from a PC or a embedded linux device to perform the update.

  • Thank you for the quick response.

    The last sentence like we can do from PC?

    How we can do? Is this tool available from nRFConnect for desktop or from any other source?

  • Hi,

    Srikara said:
    How we can do? Is this tool available from nRFConnect for desktop or from any other source?

    mcumgr is a command line tool that implements a SMP client, which you can run from your PC. It is not part of nRF Connect for desktop, but is a separate tool. See MCUmgr for details on how to install and use it.

Related