Created Flashing (markdown)

demik 2021-08-26 15:53:09 +02:00
parent 2bb1a189c2
commit 4663ba4a8c

58
Flashing.md Normal file

@ -0,0 +1,58 @@
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](https://github.com/demik/quack/wiki/External-Power-Cable).
Most USB to TTL FTDIs adapters with real FT232 should work. IF you are unsure, the DSD TECH SH-U09F is a good option.
### esptool.py
The tool needed for flashing ESP32s is called esptool.py and is available [here](https://github.com/espressif/esptool)
Follow the link below 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 connecter the VCC / +5V / +3.3V)
3. Put the Quack converter in flash mode
4. Put the release firmware files somewhere (I'm using /tmp in this example)
5. 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
```
6. Power on the Quack adapter (either with your Mac or the external power cable)
7. 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.
```
8. Put the Quack in normal operation mode
9. Reboot the Quack Converter