wizusb is a command-line utility for reading and writing registers on embeddedTS Wizard microcontrollers via USB.
Because this tool interacts with raw USB hardware using pyusb, you must have libusb installed on your host machine.
- Debian/Ubuntu:
sudo apt install libusb-1.0-0 - Fedora/RedHat:
sudo dnf install libusb1 - Windows: You may need to use Zadig to install the
libusb-win32driver for the device.
You can install this tool directly from GitHub using pip. This will automatically install dependencies and create the wizusb command.
pip install git+https://github.com/embeddedTS/wizusb.gitBy default, Linux does not allow non-root users to access USB devices. To run wizusb without sudo, you must add a udev rule.
Create a file named /etc/udev/rules.d/99-wizard.rules
Add the following line to the file:
SUBSYSTEM=="usb", ATTRS{idVendor}=="35b0", ATTRS{idProduct}=="0000", MODE="0666"
Reload the rules:
sudo udevadm control --reload-rules && sudo udevadm trigger
Unplug and replug your device.
Wizusb's arguments are:
wizusb <address> [Write value]
If just an address is specified, it reads. If the write value is given, then it writes the value to the specified address.
Refer to your specific product's manual for full regsiter documentation.
These functions will work on any Wizard Microcontroller based device.
## Get Model Number
wizusb 0
# Returns, eg 0x9370
## Get Revision
wizusb 1
# Reboot device
wizusb 8 0x1The wizard includes support for restrapping most processors. This register value is saved and will persist between resets.
The 0x17 value controls the BOOT_MODE[1:0] bits in the CPU.
| Value | Strapping |
|---|---|
| 0x0 | Boot from Internal Fuses |
| 0x1 | USB Serial Downloader |
| 0x2 | USDHC1 8-bit eMMC (Default) |
| 0x3 | USDHC2 4-bit SD |
To write these values:
# Switch boot to USB Serial Downloader
wizusb 17 0x1
# Reset the board, so it comes up in the new strapping
wizusb 8 0x1To restore eMMC (default):
# Switch boot to USDHC1 8-bit eMMC
wizusb 17 0x2
# Reset the board, so it comes up in the new strapping
wizusb 8 0x1