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

DFU speed over UART on NCS/Zephyr

Hey all,

Here's another question. Many of the examples in the Nordic Connect SDK are rather large. Transferring them with MCUmgr at 115200 BAUD takes sometimes more than a minute. I took a look at how MCUmgr is implemented. It appears it uses the tarm serial library. The problem seems that Cgo may not support bauds greater than 230400. (Even then tarm doesn't go above 115200) Has anyone experimented with higher speeds over UART + MCUBoot? It also seems like there may be some work being done in pynrfjprog but no direct developer tools like nrfjprog have been updated to use this functionality.

Thanks!

Parents Reply Children
  • Thanks !

    I got it working at 1M BAUD using pynrfjprog. Speeds are so much faster now! Slight smile

    Now my question is, it seems that my .overlay file in the ncs/bootloader/mcuboot/boot/zephyr/boards directory is not being applied. I want to set the speed to 1M BAUD while leaving the application at 115200. Any thoughts there?

    It does work the other way around (i.e. if I set the BAUD to 1M in the base .dts file and then update it to 115200 in the application) I'm still getting my head around devicetree configuration. Any help is appreciated!

  • Jared said:
    It does work the other way around (i.e. if I set the BAUD to 1M in the base .dts file and then update it to 115200 in the application)

     I am not an expert at this, but first setting the bad to 1M and then updating this in the application should work.

  • I figured out what was going on. By default the bootloader uses dts.overlay In order to include another .overlay file it needs to be added like this:

    cd ncs/bootloader/mcuboot/boot/zephyr
    west build -b circuitdojo_feather_nrf9160 -p -- -DDTC_OVERLAY_FILE=boards/circuitdojo_feather_nrf9160.overlay

    I'm compiling the bootloader separate and flashing it first. I can then upload application code using mcumgr or newtmgr.

Related