Page 1 of 1

ESP32 SPI Flash write issue

Posted: Mon Apr 22, 2024 5:50 am
by swetha123
Hi,
I am currently working in the ESP32 WROOM-32U development kit. I need to write and read the data on an external flash chip using the SPI interface. I took the sample code from esp-idf storage example code -> "ext_flash_fatfs". I flashed the code directly on the esp32 board and observed the below error response,

I (328) spi_flash: detected chip: generic
I (331) spi_flash: flash io: dio
W (335) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (349) app_start: Starting scheduler on CPU0
I (353) app_start: Starting scheduler on CPU1
I (353) main_task: Started on CPU0
I (363) main_task: Calling app_main()
I (363) example: Initializing external SPI Flash
I (363) example: Pin assignments:
I (373) example: MOSI: 23 MISO: 19 SCLK: 18 CS: 5
I (373) example: DMA CHANNEL: 3
E (383) memspi: no response

E (383) example: Failed to initialize external Flash: ESP_ERR_INVALID_RESPONSE (0x108)
I (393) main_task: Returned from app_main()

Need support to overcome this issue.

Re: ESP32 SPI Flash write issue

Posted: Mon Apr 22, 2024 6:40 am
by ESP_Sprite
So, 'external' SPI flash in this context means a SPI flash chip other than the main flash that contains the program itself. Is that what you intended? If so, did you actually hook up an external flash chip?

Re: ESP32 SPI Flash write issue

Posted: Mon Apr 22, 2024 7:22 am
by swetha123
In ESP32 WROOM-32U development kit, i thought the external flash chip is already mounted within the kit. Correct me if am wrong.

Re: ESP32 SPI Flash write issue

Posted: Mon Apr 22, 2024 8:35 am
by ESP_Sprite
That would be the main flash; you can look at the examples/storage/spiffs example to store data there.

Re: ESP32 SPI Flash write issue

Posted: Mon Apr 22, 2024 12:41 pm
by swetha123
I got it, Thanks for your reply.