ESP32-S3 with large FLASH resets before second-stage bootloader
Posted: Mon Dec 05, 2022 5:22 pm
Hello,
I have issues with my custom board. The FLASH is 64MB (S25FS512S) and connected as follow: I manage to download the code to the flash:
But it never boots. This is what I get in the monitor:
This goes on forever. It looks like the watchdog is failing but the entry point is not even reached.
Here is an extract of sdkconfig:
Any idea what I'm missing?
Communication with ESP32-S3 and with FLASH seems ok...
I spent two days on this and I'm out of things t try.
Julien
I have issues with my custom board. The FLASH is 64MB (S25FS512S) and connected as follow: I manage to download the code to the flash:
Code: Select all
julien@Fozzy:~/Projets/hello_world$ /home/julien/.espressif/python_env/idf5.0_py3.10_env/bin/python ../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyACM0 -b 460800 --before default_reset --after hard_reset --chip esp32s3 --no-stub write_flash --flash_mode dio --flash_size 64MB --flash_freq 20m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello_world.bin
esptool.py v4.4
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:e0:ed:ec
Changing baud rate to 460800
Changed.
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00041fff...
Erasing flash...
Took 1.77s to erase flash block
Wrote 21504 bytes at 0x00000000 in 0.5 seconds (331.5 kbit/s)...
Hash of data verified.
Erasing flash...
Took 0.24s to erase flash block
Wrote 3072 bytes at 0x00008000 in 0.1 seconds (453.0 kbit/s)...
Hash of data verified.
Erasing flash...
Took 1.99s to erase flash block
Wrote 201728 bytes at 0x00010000 in 4.8 seconds (335.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Code: Select all
Executing action: monitor
Running idf_monitor in directory /home/julien/Projets/hello_world
Executing "/home/julien/.espressif/python_env/idf5.0_py3.10_env/bin/python /home/julien/esp/esp-idf/tools/idf_monitor.py -p /dev/ttyACM0 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 /home/julien/Projets/hello_world/build/hello_world.elf -m '/home/julien/.espressif/python_env/idf5.0_py3.10_env/bin/python' '/home/julien/esp/esp-idf/tools/idf.py' '-p' '/dev/ttyACM0'"...
--- idf_monitor on /dev/ttyACM0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x1a (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:DIO, clock div:4
load:0x3fce3810,len:0x167c
ets_loader.c 78
device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Waiting for the device to reconnect
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x1a (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:DIO, clock div:4
load:0x3fce3810,len:0x167c
ets_loader.c 78
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x1a (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:DIO, clock div:4
load:0x3fce3810,len:0x167c
ets_loader.c 78
device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Waiting for the device to reconnect
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x1a (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:DIO, clock div:4
load:0x3fce3810,len:0x167c
ets_loader.c 78
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x1a (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:DIO, clock div:4
load:0x3fce3810,len:0x167c
ets_loader.c 78
device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Waiting for the device to reconnect
Here is an extract of sdkconfig:
Code: Select all
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_NO_STUB=y
# CONFIG_ESPTOOLPY_OCT_FLASH is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y
CONFIG_ESPTOOLPY_FLASHMODE="dio"
# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
CONFIG_ESPTOOLPY_FLASHFREQ_20M=y
CONFIG_ESPTOOLPY_FLASHFREQ="20m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_64MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="64MB"
# CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE is not set
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# end of Serial flasher config
Communication with ESP32-S3 and with FLASH seems ok...
I spent two days on this and I'm out of things t try.
Julien