Open main menu

Changes

3,319 bytes added ,  Yesterday at 16:59
→‎Firmware: Micropython install
</pre>
While the device enumerates as USB and has capacity to facilitate serial communications, it is not really feasible with the constant reboot cycle. However connecting to the <code>TxTXD0</code> pin with to the <code>Rx</code> of a USB/Serial UART converter the following can be captured. Additionally holding the ESP32 in reset and monitoring the UART you can capture the following by briefly releasing the reset and then re-enabling reset, othrewise you will get a continuous flood of the same messages at <code>115200 baud</code>.
<pre>
ESP-ROM:esp32s3-20210327
invalid header: 0xa5ff005a
invalid header: 0xa5ff005a
</pre>
 
Some of the boards do properly enter "Boot Mode" which is done by connected <code>GPIO0</code> to ground. This can easily be done by using a jumper wire from a through hole header that exposes both <code>GPIO0</code> and ground and pressing a reset button immediately below it. Alternatively this can be achieved by using a wired to pressed to the bottom right most module pin and the metal RF shield on top of the module while connecting to USB to power on.
 
<pre>
esptool.py -p /dev/ttyACM0 -b 115200 erase_flash
esptool.py v4.8.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_1v8)
Crystal is 40MHz
MAC: 68:b6:b3:3c:f4:24
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 70.8s
Hard resetting via RTS pin...
</pre>
 
Note in this instance RTS is not connected, however the device remains in "Boot Mode" and the following action can be performed.
 
<pre>
esptool.py -p /dev/ttyACM0 -b 1500000 write_flash -z 0 ESP32_GENERIC_S3-SPIRAM_OCT-20240920-v1.24.0-preview.335.gb08ddbba5.bin
esptool.py v4.8.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_1v8)
Crystal is 40MHz
MAC: 68:b6:b3:3c:f4:24
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1500000
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00197fff...
Compressed 1668096 bytes to 1089606...
Wrote 1668096 bytes (1089606 compressed) at 0x00000000 in 18.7 seconds (effective 714.0 kbit/s)...
Hash of data verified.
 
Leaving...
Hard resetting via RTS pin...
</pre>
 
Note that in this case without <code>RTS</code> the device must be manually power cycled or reset to load the new firmware. Now you should see a different enumeration via <code>dmesg</code>.
 
<pre>
new full-speed USB device number 41 using xhci_hcd
New USB device found, idVendor=303a, idProduct=4001, bcdDevice= 1.00
New USB device strings: Mfr=1, Product=2, SerialNumber=3
Product: Espressif Device
Manufacturer: Espressif Systems
SerialNumber: 123456
cdc_acm 3-2:1.0: ttyACM0: USB ACM device
</pre>
 
Monitoring <code>TXD0</code> the following is received.
 
<pre>
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2a (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3820,len:0x105c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xbd8
load:0x403cc700,len:0x2e34
entry 0x403c989c
MicroPython v1.24.0-preview.335.gb08ddbba5 on 2024-09-20; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
Type "help()" for more information.
>>>
</pre>
 
You can also now use the USB interface, with something like <code>screen /dev/ttyACM0 115200</code>. If successful you should be greeted with blank output. Pressing <code>Enter</code> should generate a Micropython prompt <code>>>></code> and pressing <code>Ctrl+D</code> generates the following.
 
<pre>
MPY: soft reboot
MicroPython v1.24.0-preview.335.gb08ddbba5 on 2024-09-20; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
Type "help()" for more information.
>>>
</pre>