[nrf 52840] usb dfu questions

Based on the NRF52840DK, we want to do a USB CDC DFU upgrade function, but we don't want to use the BLE demo. You want to enter the duf mode by adding and modifying registers through the usb cdc routine in the ordinary peripheral demo.
We don't know that mergehex -- merge bl is being executed_ temp.hex app. hex s140_ nrf52_ 7.0.1_ softdevice. When hex -- output whole.hex, how to fill in the corresponding protocol, or whether the command changes.

  • Hi Tracy, 

    I assume you want to do DFU buttonless for the USB DFU application you are developing  ? 
    You can do that by following what we did in the ble_dfu_buttonless_bootloader_start_finalize() function in ble_dfu.c file in the buttonless example. 

    The way it works is pretty simple, to switch, we write to the retention register GPREGRET a flag (BOOTLOADER_DFU_START = 0xB1) and then we do a soft reset. Since the retention register keeps its value after the reset, the bootloader will check this value when it booting up after the reset and then can enter DFU mode instead of starting the normal application. This is the same as when we hold Bootloader button and trigger a reset.

    We don't know that mergehex -- merge bl is being executed_ temp.hex app. hex s140_ nrf52_ 7.0.1_ softdevice. When hex -- output whole.hex, how to fill in the corresponding protocol, or whether the command chang

    I don't really understand what you want to ask about mergehex here. But my suggestion is to avoid to use mergehex and flash everything one by one to make sure them work before you use mergehex. 

Related