I’m stuck trying to get my custom ESP32-S3 PCB to work. It uses S25FL064LABNFA040 as program flash, a 8 MB quad NOR flash. Two PCBs behave the same. I try to use framework arduinoespressif32.
The board accepts to set fuses and be programmed, but when starting I get:
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.
Thanks for your reply.
I change to "flash_mode": "dio"
and build.arduino.memory_type: "dio_qspi" (though I don’t have any PSRAM)
For good measure also build.memory_type: "dio_qspi"
The result is almost exactly the same, the only difference being len:0x3ac. Since it already says mode:DIO perhaps this is the wrong track.
It would be nice to test with lower f_flash than 80M. Is this possible? (Lower values don’t compile as described in my first post.)
For the first transmissions after booting, I see CLK period of 200ns period=5MHz (using oscilloscope). Then it also uses 50ns period=20MHz. Still, this is not that fast.
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.