Page 1 of 1

External SPI Flash (Winbond) and SPI Ethernet are not working on the same bus.

Posted: Thu Oct 21, 2021 10:11 am
by nilesh-dryad
Hello ESP developers,

I connected external SPI flash (W25Q32JV) to ESP32S2. Standalone example just works fine on ESP32S2. I am able to read/write into file.
I also connected SPI Ethernet (WIZ850io - W5500) to ESP32S2. Standalone example also works fine with ESP32S2. I am getting IP and able to ping to my ESP32S2 from my network.

But when I try to use external SPI flash and SPI Ethernet on the same bus together. None of them are working. I am getting flash error (wl_erase_range failed) while writing into any file and ESP is also not getting any IP.

Is there any configuration change required in order to make it work together on the same bus.

Note: There are two SPI bus on ESP32S2 but I am using dedicated SPI bus for LoRa. I also tried to share Ethernet and External Flash with LoRa SPI bus but that didn't work either.

It looks like spi flash driver and spi Ethernet driver does not support any other SPI device on bus. Is it true?

Re: External SPI Flash (Winbond) and SPI Ethernet are not working on the same bus.

Posted: Mon Oct 25, 2021 6:54 am
by ESP_LJH
Which pins do you use respectively?
Generally, please use gpio27~32 to connect a flash, then please use another SPI bus for other SPI peripherals.

Re: External SPI Flash (Winbond) and SPI Ethernet are not working on the same bus.

Posted: Tue Oct 26, 2021 10:00 am
by nilesh-dryad
I use GPIO 34(MISO), GPIO33(MOSI), GPIO35(SCK), GPIO36(CS) for external SPI flash.
Are you suggesting to share SPI between internal flash and external flash?

Note that we are also using External RAM. As far as I know if I use external RAM and if I share external flash with internal flash, I might face cache issue while using external RAM and external flash togather. Correct me If I am wrong.

I have faced cache issue while writing into internal flash partition using buffer which is allocated using external RAM. So Instead of writing into internal flash, we are going to use external flash.

Re: External SPI Flash (Winbond) and SPI Ethernet are not working on the same bus.

Posted: Thu Nov 25, 2021 9:55 am
by nilesh-dryad
THis is not supported in ESP-IDF.
https://github.com/espressif/esp-idf/issues/7961