Samstag, 14. Juni 2025

OpenDTU-OnBattery code upgrade with "tiny" ESP32-WROOM-32U

 As a reminder on how to do the OpenDTU-OnBattery code upgrade with "tiny" ESP32-WROOM-32U let me remind myself to do it like this:

  https://github.com/hoylabs/OpenDTU-OnBattery

 

 PS C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py> C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3\esptool.exe --chip auto --port COM4 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 'C:\Users\user\Documents\2025\opendtu backup 06\opendtu-onbattery-2025.06.11-generic_esp32_4mb_no_ota.factory.bin'
esptool.py v4.8.1
Serial port COM4
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: a8:42:e3:4b:f3:1c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0027efff...
Compressed 2616400 bytes to 1567250...
Wrote 2616400 bytes (1567250 compressed) at 0x00000000 in 137.9 seconds (effective 151.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
PS C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py>

Montag, 17. März 2025

Using the Arduino IDE to flash an ESP32-S3 with a CP2102 serial adapter after you did not do any of that in a LONG time

PS C:\Users\user\Downloads> C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3\esptool.exe --port COM6 erase_flash
esptool.py v4.8.1
Serial port COM6
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: cc:ba:97:14:07:44
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.0 seconds.
Hard resetting via RTS pin...

 

If you order everything from the cheapest vendor and your CP2102 has the weirdest cables, you may want to stick with 115200 baud instead of  921600 baud.

PS C:\Users\user\Downloads> C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.9.dev3\esptool.exe --baud 115200 --port COM4 --chip esp32s3 --before default_reset --after hard_reset write_flash --flash_mode dout --flash_freq 40m --flash_size detect 0x0 opendtu-onbattery-generic_esp32s3.factory.bin
esptool.py v4.8.1
Serial port COM4
Connecting....
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: cc:ba:97:14:07:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00000000 to 0x00242fff...
Flash params set to 0x0340
SHA digest in image updated
Compressed 2371296 bytes to 1444488...
Wrote 2371296 bytes (1444488 compressed) at 0x00000000 in 130.1 seconds (effective 145.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
PS C:\Users\user\Downloads>