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

nilesh-dryad
Posts: 6
Joined: Mon Jun 28, 2021 3:45 pm

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

Postby nilesh-dryad » Thu Oct 21, 2021 10:11 am

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?

ESP_LJH
Posts: 387
Joined: Tue May 18, 2021 9:21 am

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

Postby ESP_LJH » Mon Oct 25, 2021 6:54 am

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.

nilesh-dryad
Posts: 6
Joined: Mon Jun 28, 2021 3:45 pm

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

Postby nilesh-dryad » Tue Oct 26, 2021 10:00 am

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.

nilesh-dryad
Posts: 6
Joined: Mon Jun 28, 2021 3:45 pm

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

Postby nilesh-dryad » Thu Nov 25, 2021 9:55 am

THis is not supported in ESP-IDF.
https://github.com/espressif/esp-idf/issues/7961

Who is online

Users browsing this forum: jjones7432 and 34 guests