5.7.1 Serial DFU Procedure

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

Figure 5-21. 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 RNBD451 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 RNBD451 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 RNBD451 device. After image transmission completion, the DFU Update Complete (DFUC) command is issued to indicate the completion and request RNBD451 to perform validation. The newly-passed firmware image is, then, validated by the RNBD451 device and responds back the with a status message. Then, the RNBD451 device can be brought out of DFU mode with the help of the DFU termination command (DFUE). The DFU procedure has an operational timeout of five seconds. If there is no communication happening within this time period, the RNBD451 device comes out of the DFU mode to Command mode. For more details on the demo procedure, refer to the RNBD451 Device Firmware Update Procedure.

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

The following conditions happen in RNBD451:

  • Enter DFU mode
    • Disconnect all links, disable ADV activity and SCAN activity
    • LED connected to PB5 indicates the DFU mode (Blue LED sequentially glows four times for ON interval of 100 ms and OFF interval of 100 ms in two seconds)
    • Disable Sleep mode
    • Disable peripheral monitor and peripheral status changed report
    • If Pin status indication function is enabled by RNBD451 SR command, The pin status indicator shows the DFU mode status (BLE STATUS IND1 pin/PB3 is low and BLE STATUS IND2 pin/PB7 is high)
  • In DFU mode
    • When an operation timeout or error occurs, then the device will be back to CMD mode
  • Abort to CMD mode or Device Reset to DATA mode
    • ADV is enabled
    • Connection cannot be restored that is created before DFU operation
The following figure illustrates a sample MSC for DFU between the host MCU and the RNBD451.
Figure 5-23. MSC for DFU