ESP32 SPI Flash write issue

swetha123
Posts: 3
Joined: Mon Apr 22, 2024 5:38 am

ESP32 SPI Flash write issue

Postby swetha123 » Mon Apr 22, 2024 5:50 am

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.
Last edited by swetha123 on Mon Apr 22, 2024 6:58 am, edited 1 time in total.

ESP_Sprite
Posts: 9725
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 SPI Flash write issue

Postby ESP_Sprite » Mon Apr 22, 2024 6:40 am

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?

swetha123
Posts: 3
Joined: Mon Apr 22, 2024 5:38 am

Re: ESP32 SPI Flash write issue

Postby swetha123 » Mon Apr 22, 2024 7:22 am

In ESP32 WROOM-32U development kit, i thought the external flash chip is already mounted within the kit. Correct me if am wrong.

ESP_Sprite
Posts: 9725
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 SPI Flash write issue

Postby ESP_Sprite » Mon Apr 22, 2024 8:35 am

That would be the main flash; you can look at the examples/storage/spiffs example to store data there.

swetha123
Posts: 3
Joined: Mon Apr 22, 2024 5:38 am

Re: ESP32 SPI Flash write issue

Postby swetha123 » Mon Apr 22, 2024 12:41 pm

I got it, Thanks for your reply.

Who is online

Users browsing this forum: aliarifat794 and 80 guests