10.5.4 Serial Bootloader Demo

This section explains Boot loading over the serial port.

Hardware Requirements

  • One WBZ351 Curiosity Board

  • USB Cables

  • PC

Software Requirements

  • MPLABX IDE/IPE

  • MicrochipUtilityTool.exe

  • Bootload enabled Firmware Image (ble_sensor.signed.unified.hex, BootloaderTimerBasedxxx.hex)

  • Bootload enabled binary image (ble_sensor.signed_uart.bin)

Procedure

Device can put in DFU Mode by one of the following methods

  1. GPIO (SW2 Button Press)

  2. Timer Based

GPIO Based DFU mode

Figure 10-92. Figure 7: Serial Bootlod Demo Start(GPIO).
  • Program WBZ351Board with the Image file(ble_sensor.signed.unified.Hex)

  • Start MicrochipUtilityTool.exe

  • Follow the steps mentioned in the above picture

    • Select Serial BootLoader Tab

    • Select Baud Rate as 115200 from the drop-down menu

    • Select the device Serial Port from the drop-down menu

    • Click on Connect/DisConnect Button

    • Press reset button on WBZ351 board, UART Rx message appears in the log window.

    • Press and hold SW2 and then press and release reset Button on the WBZ351 Board and then release SW2 button

    • WBZ351Board will enter in DFU mode. The following message will appear in the log

      • DFU Now!

    • Click on Select File Button and choose ble_sensor.signed_uart.bin file

    • Click on Send Image Button

    • Image starts, downloading into WBZ351 device. Progress bar keeping advancing and debug status (Frame: Byte Sent: Time(hh:mm:ss)) keeps updating

    Figure 10-93. Figure 8: Serial Bootalod Demo End(GPIO)
  • Wait for Image download to complete (Progress bar = 100%, Status= Programming Complete)

  • Press reset button on WBZ351 Board. Slot1 is erased and new image is copied from slot0 and start executing new image.

    • A new command (0x12) has been added in the Tool. This is the last command sent during DFU process. If this command is supported in Boot loader code, then the WBZ351device will be automatically booted into new image.

Timer Based DFU mode

Figure 10-94. Figure 9: Serial Bootlad Demo Start (Timer).
  • Program WBZ351 Board with the Image file (BootloaderTimerBasedxxx.hex)

  • Start MicrochipUtilityTool.exe

  • Follow the steps mentioned in the above picture

    • Select Serial BootLoader Tab

    • Select Baud Rate as 115200 from the drop-down menu

    • Select the device Serial Port from the drop-down menu

    • Click on Connect/DisConnect Button

      • Connection status as Connected.

    • Click on Select File Button and choose ble_sensor.signed_uart.bin file

    • Enter (Decimal Integer) Timeout period (step 7). Default is 30 sec.

    • Check Timer

    • Click on Send Image Button

    • Tool will wait for WBZ351device to be in DFU mode for a time period entered in step 7(Default 30 sec)

    • Press Reset Button. The device will enter in DFU mode. The following message will appear in the log

      • DFU Now!

    • Image starts, downloading into the WBZ351device. Progress bar keeping advancing and debug status (Frame: Byte Sent: Time(hh:mm:ss)) keeps updating

Figure 10-95. Figure 10: Serial Bootoad Demo End (Timer).
  • Wait for Image download to complete (Progress bar = 100%, Status= Programming Complete).

  • The device will automatically boot into new image.

Summary

  • Frame size = 4096 bytes.

  • Image (size = 161920 bytes) takes 16 sec to transmit.

  • Default Timeout (30 sec) can be changed in the tool

  • Timer Based Bootloading mode will automatically boots into new image after image download. No need to press reset button.

  • GPIO based Botloading mode can also boot automatically into new image if a new command (command #0x12) is added into bootloader code.