nRF5 SDK v17.0.2
DFU Trigger Library (USB)
This information applies to the nRF52840 SoC only.

When the trigger library is added to an application, it allows a connected USB host to remotely tell the app to reboot into the bootloader to allow it to be updated via DFU. When asked to enter bootloader mode, it pulls its own reset pin using the GPIO pin BSP_SELF_PINRESET_PIN (by default, only available on PCA10059). As a consequence, the library requires the following:

The experimental Open USB bootloader example is configured in this way, and newer versions of the nRF Connect PC app are equipped to communicate with the Trigger module.

Serial number

We recommend setting the USB serial number with app_usbd_serial_num_generate (see also note below). This allows the host to follow the device as it transitions from application to bootloader, since the bootloaders have the same serial number.

When the Trigger is the only USB class present in the application (i.e. when the NRF_DFU_TRIGGER_USB_USB_SHARED config is 0), the Trigger library automatically calls app_usbd_serial_num_generate.


This library is similar to the Runtime part of the USB DFU 1.1 spec, but differs in the following way:

Request Opcode Response
DFU_DETACH 0x00 None, reboots into bootloader.
Firmware Info 0x07 Information structure, see app_usbd_nrf_dfu_trigger_nordic_info_t
Version String 0x08 "[application name] [semantic_version]"
The default [semantic version] is "0.1.0+MMM-DD-YYYY-HH-MM-SS", where the timestamp is the time of compilation. The application name and version can be set via sdk_config.

Documentation feedback | Developer Zone | Subscribe | Updated