5.7.1 Serial DFU Procedure

In this method, the RNBD350 device is configured into DFU mode to support the serial firmware update.

Figure 5-11. Serial DFU Block Diagram

The DFU commands are, then, sequentially passed to the device starting with a DFU update request command (DFUU). The device, then, responds back with a maximum fragment image size as its approval to accept the firmware update request. The maximum fragmented size is the range at which the RNBD350 device can receive the data. The DFU firmware update, then, starts with a DFU Update Start (DFUS) command and a continuous sequence of DFU image distribution commands. The DFU image Distribution (DFUD) command appends the firmware data in fragmented size not greater than the maximum size proposed by the RNBD350 device. All commands must be in ASCII format, except the payload parameter in the DFUD (image distribution) command, which must be in raw hex format to increase the transmission performance. The DFU image distribution command is passed until the complete firmware file data is passed to the RNBD350 device. After image transmission completion, the DFU Update Complete (DFUC) command is issued to indicate the completion and request RNBD350 to perform validation. The newly-passed firmware image is, then, validated by the RNBD350 device and responds back the with a status message. Upon receiving a %VALIDATION_SUCCESS% response from the RNBD350, the DFUE command is employed to reboot the device, signifying a successful update. For more details on the demo procedure, refer to RNBD350 Device Firmware Update Procedure.

Note: After a device enters the DFU (Device Firmware Update) mode, it will remain in this mode if an interrupt occurs or the process does not complete successfully. It will not revert to the Command mode, and the RNBD350 will stay in DFU mode only.

To exit the DFU mode on the RNBD350, the complete command sequence must be followed successfully. Otherwise, the device will remain in the DFU mode. The users cannot forcibly switch from the DFU mode to the Command mode by simply plugging in or unplugging the USB cable.

The following figure illustrates the DFU mode transition among the Data mode and Command mode for the serial DFU procedure.
Figure 5-12. DFU Mode Transition Procedure

The following conditions happen in RNBD350:

  • In CMD mode:
    • MCU may send command to change baud rate
    • MCU sends DFU command to enter DFU mode
  • Enter DFU mode:
    • Disconnect all links, disable ADV activity and SCAN activity
    • Disable Sleep mode
    • Disable all interrupts
    • Erase metadata block of application firmware
    • Reboot to enter secondary bootloader
  • In DFU mode:
    • DFU abort, validation error, timeout occurred and error occurred will be at DFU mode
  • Reset to jump to the new image when the validation is successful
The following figure illustrates a sample MSC for DFU between the host MCU and the RNBD350.
Figure 5-13. MSC for DFU