The nRF52840 Dongle, unlike our development kits, does not have a debugger on board. Therefore, the procedure for flashing firmware is different. In this short paragraph, we will show you what is needed to flash the nRF52840 Dongle.
In order to flash the dongle with your firmware, You need to put the dongle manually in DFU (Device Firmware Update) mode, and use nrfutil to create a firmware package compatible with the factory-programmed bootloader on the nRF52840 Dongle. We will explain this in the following steps:
1. Download & set up nrfutil on your machine from here. Note that nrfutil is a seperate binary and you need to download it and set it up as explained in the Setup and install commands of this blogpost .
2. Put the dongle in DFU mode by simply pressing the RESET button.
The reset button is on the far side of the board from the USB connector. Note that the button does not face up. You will have to push it from the outside in, towards the USB connector.
The RGB light will turn red with a fade pattern, signaling that the dongle is in DFU mode.
3. Generate the firmware package that is compatible with Nordic’s bootloader by typing the following command in your terminal. Note you need to be in the /build/zephyr
directory of your project, otherwise you need to specify the absolute path for the zephyr.hex
.
nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application zephyr.hex --application-version 1 app.zip
4. Flash the firmware package onto the nRF52840 Dongle by issuing this command
nrfutil device program --firmware app.zip --traits nordicDfu