7 Flashing
demik edited this page 2021-08-26 19:36:44 +02:00

Your Quack Converter should come with the firmware already installed.

However, if you are building it from scratch by yourself, or want to update the firmware, there is provision to flash and update the firmware

You will need an USB to TTL FTDI Adapter with 3.3V support and (optional) the external power cable. Most USB to TTL FTDIs adapters should work. IF you are unsure, the DSD TECH SH-U09F is a good option.

The firmware releases are available for download https://github.com/demik/quack/releases. The firmware is split into 3 parts:

  • partition-table.bin
  • bootloader.bin
  • quack.bin

Be sure to grab all files.

esptool.py

The tool needed for flashing ESP32s is called esptool.py and is available here. Follow the link to find installation instructions

Flashing

  1. Power off the Quack converter
  2. Connect the TTL Adapter with only pins GND, RX and TX (do NOT connect VCC / +5V / +3.3V)
  3. Put the Quack converter in flash mode (see here)
  4. Put the release firmware files somewhere (I'm using /tmp in this example)
  5. Power on the Quack adapter (either with your Mac or the external power cable)
  6. Execute the esptool.py with the following parameters
esptool.py -p /dev/ttyUSB0 -b 115200 --before=no_reset --after=no_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 /tmp/partition-table.bin 0x1000 /tmp/bootloader.bin 0x10000 /tmp/quack.bin
  1. The flashing should go like this:
esptool.py v3.1
Serial port /dev/ttyUSB0
WARNING: Pre-connection option "no_reset" was selected. Connection may fail if the chip is not in bootloader or flasher stub mode.
Connecting........_____....._____....._____....._____.....____
Detecting chip type... ESP32
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 30:83:98:ca:fe:74
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x000f3fff...
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 384.9 kbit/s)...
Hash of data verified.
Compressed 24992 bytes to 15261...
Wrote 24992 bytes (15261 compressed) at 0x00001000 in 1.7 seconds (effective 119.7 kbit/s)...
Hash of data verified.
Compressed 932016 bytes to 563202...
Wrote 932016 bytes (563202 compressed) at 0x00010000 in 50.3 seconds (effective 148.3 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.
  1. Put the Quack in normal operation mode
  2. Reboot the Quack Converter