PlatformIO Community

Pio 6.0 esp32-c3 boot fails due to unrecognised SPI flash

I’ve just upgraded to pio 6.0. I’m using an ESP32-C3 risc-v board similar to DevKitM-1, but slightly different. It now fails to recognise the SPI Flash device during boot. The chip is on the ESP32-C3-32S module. It comes back with a JEDEC device id of 0x5e6015.

This is not recognised by the spi_flash boot code. It tries a series of known devices, then says it is a generic device, then it fails as the device is 4Mb, but it expects a 2Mb part. I’ve changed the flash size in menuconfig, but this makes no difference.

It looks like the Flash chip is not in the database. Perhaps the manufacturer is using different parts due to the chip shortage?

This means that my project that was working fine with pio < 6.0 is now broken, stuck in a boot loop. How can I add a new device into the SPI Flash database? How can I find data on the device 0x5e6015?

Please report with platformio.ini + code (or project) and issue to Issues · platformio/platform-espressif32 · GitHub

The code in question is not in that repository. I’ve found a work around :

Editing packages/framework-espidf/components/spi_flash/esp_flash_spi_init.c +285 : comment out the error return.

That gets me working again. It looks like it is a problem with the espressif library

Still the Espressif32 might want to publish & use an updated package of framework-espidf if the most simplest of projects don’t work with it – so it’s well in the scope of that repo.