5.1 Device Firmware Update (DFU) over UART

The WILCS02 modules are secured parts and all traditional programming interfaces are disabled. These modules can only execute the firmwares which are authorized by Microchip's signer. As all the programming interfaces are disabled, the WILCS02 modules enable a special mode called the DFU mode to perform the firmware update. The WILCS02 module provides fail safe device firmware upgrade by having two image slots in the Flash map. The WILCS02 modules shipped from Microchip use the Image1 partition to store the default firmware.

The standard WILCS02 firmware is released on the WILCS02 product page. The release package contains the firmware image binary file.

Figure 5-1. Flash Map

These firmware images contain a 4 bytes sequence number in the header which is used by the boot ROM to determine which image to boot on every power up. The boot ROM always chooses the lowest sequence number firmware image among the two partitions but if both images have the same sequence number, the one in the higher memory address (0x600F0000) or from Image2 partition will be booted.

The sequence number with all-zeros and all-0xFFs are reserved (invalid) sequence numbers, the boot ROM validates the firmware during the DFU programming and checks the authenticity by verifying the signature. If the firmware is not authentic (in other words, not signed by Microchip) then the boot ROM invalidates the image by setting the sequence number to zero and thereby rejects these firmware image.