I can not change f_flash to for example 40M as that gives compilation error *** [.pio/build/skh3/bootloader.bin] Source '/home/andpe/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/bin/bootloader_qio_40m.elf' not found, needed by target '.pio/build/skh3/bootloader.bin'.
Likewise with flash_mode. The only files in that directory are:
bootloader_dio_80m.elf bootloader_opi_80m.elf bootloader_qio_120m.elf bootloader_qio_80m.elf
It appears the bootloader uses DIO. Looking at CS/SCK/MOSI/MISO with oscilloscope doesn’t reveal anything strange. There’s traffic every 1-2 seconds as ESP tries to start. When uploading a program, there’s a reasonable amount of SPI traffic. I didn’t try to probe quad-SPI traffic as I don’t know what to expect.
I desoldered the S25FL064LABNFA040 flash and patched in a XM25QH64C flash (identified by marking “25qh64c”) that I took from a ESP32-S3-WROOM module. This works!
I doubt the flash chip was broken as I’ve tried three of them. The problem is narrowed down to either compatibility or some settings I’m unaware of.
Presumed datasheet: https://www.xmcwh.com/uploads/207/XM25QH64C.pdf
But this chip is not available from any common distributor.
I don’t see any pinout differences between the two chips.
I see these relevant fuse settings in espefuse. All of them are zero:
FLASH_TPUW - not needed for me
FLASH_ECC_MODE - ?
FLASH_TYPE - 0 is correct
FLASH_PAGE_SIZE - 0 means 256 bytes which should be good
FLASH_ECC_EN - ?
FORCE_SEND_RESUME - ?
FLASH_CAP - not documented
FLASH_TEMP - not documented
FLASH_VENDOR - not documented
The ones I marked with “?” or “not documented” could be relevant, for all I know. I’m stuck again, so I appreciate any ideas.
I had an epiphany and replaced the ESP32-S3 by ESP32-S3FN8, with 8 MB internal flash. After removing the external flash, this worked too!
Still unknown why my external flash of choice didn’t work but using internal flash is better anyway.
Thanks maxgerhardt for your help.