From 5b77bcca71207099143c055a56fe8dd4c0076ecd Mon Sep 17 00:00:00 2001 From: Peter Hart Date: Mon, 14 Sep 2020 08:09:48 -0400 Subject: [PATCH] Add flashing notes. --- notes.org | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/notes.org b/notes.org index 25fc6cb..3cd68c3 100644 --- a/notes.org +++ b/notes.org @@ -1,6 +1,32 @@ #+TITLE: MicroPython Implementation Notes +* Backup Up firmware, flashing, etc. + +On lolin32, need to hold down the reset while esptool is connecting, +and then release to get this to work. + +** Backup existing firmware from 4M Flash ESP32 +#+BEGIN_SRC bash +esptool.py -b 115200 --port /dev/ttyUSB0 read_flash 0x00000 0x400000 lolin32_original.bin +#+END_SRC + +** Update Flash from backup +#+BEGIN_SRC bash +esptool.py -b 115200 --port /dev/ttyUSB0 write_flash --flash_freq 80m 0x000000 lolin32_original.bin +#+END_SRC + +** Erase Flash +#+BEGIN_SRC bash +esptool.py -b115200 --port /dev/ttyUSB0 erase_flash +#+END_SRC + +** Flash with MicroPython + +#+BEGIN_SRC bash +esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 ~/Downloads/esp32-idf3-20200902-v1.13.bin +#+END_SRC + * Circuit Layout @@ -50,7 +76,7 @@ from machine import Pin vext = Pin(21, Pin.OUT, Pin.PULL_HOLD) vext.value(0) # Turns ON Vext vext.value(1) # Turns OFF Vext -machine.deep_sleep() +machine.deepsleep() #+END_SRC * Wifi Connection Example, outbound requests.