5.1.1 DFU Utility
Following are the dependencies of the tool:
- Hardware
- WILCS02 module
- FTDI Cable
- Software
- Operating System Drivers:
- For Windows:
- For Linux (Ubuntu):
- Linux loads the Virtual COM port (VCP) driver by default, During the process the script will take care of loading the appropriate driver D2XX/VCP
- Operating System Drivers:
- For more details about the D2XX driver installation, refer to the FTDI Drivers Installation Guide for
Linux
$ sudo cp -r release/build/lib* /usr/local/lib $ cd /usr/local/lib/ $ sudo ln -s libftd2xx.so.1.4.27 libftd2xx.so $ sudo chmod 0755 libftd2xx.so.1.4.27 $ sudo ldconfig /usr/local/lib/
- Python 3
- ftd2xx==1.3.2
- pyserial==3.5
Hardware Setup
The WILCS02 module exposes the following pins to perform DFU.
WILCS02 Module | Pin | Description |
---|---|---|
MCLR_N | 4 | Master Clear Reset, active -low |
DFU_Rx/ Strap1/ PB0 | 10 | DFU pattern clock/ UART Rx |
DFU_Tx/ Strap2/ PB1 | 26 | DFU pattern data/ UART Tx |
WILCS02-SD Board
The WILCS02-SD Board expose the DFU pins to Jumper J103, J104 and J207.
The following table show the connection between the FTDI cable and the WILCS02-SD board when DFU is performed.
FTDI Cable (Color) | WILCS02-SD Board |
---|---|
GND (Black) | J104-3 (GND) |
CTS# (Brown) | J207 (MCLR_N) |
VCC (Red) | NC |
TXD (Orange) | J103-2 (Strap1/ PB0) |
RXD (Yellow) | J104-2 (Strap2/ PB1) |
RTS# (Green) | NC |
The DFU utility simplifies the dependencies installation by providing a requirement file with all the necessary python modules.
Before running the
DFU utility, navigate to rnwf_utilities_vX.X.X\dfu
and install all
the requirements using the following python command.
>python -m pip install -r requirements.txt
> python do_dfu.py [-h] [-b BIN_FILES BIN_FILES | -e ERASE [ERASE ...]] [-s SEQ_NUM] [-p PORT] [-v]
options:
-h, --help show this help message and exit
-b BIN_FILES BIN_FILES
Write option: Erase and write binary file to hexadecimal starting address or section (low,
high, file-system).
-e ERASE [ERASE ...] Erase option: Provide either the hexadecimal starting address and whole number of 4096 byte
pages to erase, or just the section to erase (low, high, file-system).
-s SEQ_NUM Modifies image sequence number. Example format: -s 0xffeeddcc
-p PORT, -port PORT User specific serial number of the FTDIport, else autodetect mechanism will be used.
-v, -verbose
The following section provides command examples for flashing and erasing the different image partitions.
Update OTA Imagepython do_dfu.py -b wilcs02_firmware_vx.x.x_ea/rio0_wifi_firmware.bin low
-s
option can be used as follows:
do_dfu.py -b wilcs02_firmware_vx.x.x_ea/rio0_wifi_firmware.bin low -s 0xffffffc0
The DFU utility is flexible to erase only the given partition of the Flash map. The
-e
option is used and either low (Image1) or high (Image2) can be
erased. The erase option is useful to switch the bootable image from other partitions of
the Flash map.
python do_dfu.py -e high