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

How to do firmware update on nRF52840 through usb (not the usb with J-link)?


I was checking DFU through serial usb/uart on the following link:

infocenter.nordicsemi.com/index.jsp

I want to double check if this entire project is for programming the nordic chip through the usb port on the long side (not the one on the short side with J-link) on nFR52840 DK.

I'd like to get a confirmation from any dev who knows about this.

And if it's yes, then it gets where it confuses me:

Do I need to build and run this project onto the DK through J-link first?

About these commands mentioned in above page:

nrfutil dfu serial -pkg package.zip -p COM_PORT for UART transport
nrfutil dfu usb_serial -pkg package.zip -p COM_PORT for USB transport

Do these commands go through the usb port on the long side (not the one on the short side with J-link)?

Does that mean I need to connect a second usb cable from pc to DK usb long side?

  • Hi,

    Yes, the example you link to, is a USB bootloader. The purpose of this is to allow the programming of new firmware via the USB peripheral in the nRF52840 (connector on the long side of the DK).

    The nRF52840 ships with an empty flash, so yes: you need to program this bootloader to the nRF52840 DK via J-Link (or another SWD programmer) first. Note that you need to understand a bit about the bootloader and DFU, since you must build the bootloader with your own public key, and generate valid update images. Please see Device Firmware Update process.

    The nrfutil command you write is to be used with the USB bootloader that we have discussed, and therefore they should be used on the long side.

    Note that this approach could make sense in an end product, but during development, you should use the J-Link. Generally, DFU is for updating the firmware "in the field".

Related