ESP32-C2 Wifi not working on module (storage driver issue)

bruno192
Posts: 3
Joined: Thu May 30, 2024 1:55 pm

ESP32-C2 Wifi not working on module (storage driver issue)

Postby bruno192 » Thu May 30, 2024 2:22 pm

Hi,

I'm using a brand new ESP32-C2 module (ESP8684-MINI-1-H2), bought from mouser.com, on a custom PCB.
Programming it using vscode over JTAG works fine with a blinking and serial print example. However when I try to use it as a Wi-Fi client I get the following errors:

[ 2289][E][WiFiGeneric.cpp:255] wifiLowLevelInit(): esp_wifi_init 4353
[ 2296][E][STA.cpp:298] begin(): STA enable failed!

4353 error code is: ESP_ERR_NVS_NOT_INITIALIZED (0x1101): The storage driver is not initialized

I've tried to run

Code: Select all

esp_err_t ret = nvs_flash_init();
Which gives error 24579 (0x6003), some kind of flash error:

Code: Select all

#define ESP_ERR_FLASH_BASE          0x6000  /*!< Starting number of flash error codes */
I've tried on an identical second chip, same problem.

If I run the exact same code on ESP8684-DevKitM-1-H4 (uses ESP8684-MINI-1) development board then there are no issues getting Wi-Fi to work.

Any idea how to resolve this issue?


bruno192
Posts: 3
Joined: Thu May 30, 2024 1:55 pm

Re: ESP32-C2 Wifi not working on module (storage driver issue)

Postby bruno192 » Fri May 31, 2024 12:25 pm

I've been using
platform = https://github.com/Jason2866/platform-e ... duino/IDF5

Which should support c2. But the strange thing is thay WiFi works on the dev. kit ESP8684-DevKitM-1-H4 (which uses C2), but not on the seperate C2 module on the custom PCB.

I've tried to use static libraries, using the station_example (esp\v5.2.1\esp-idf\examples\wifi\getting_started\station), but to no avail. I can't get it to work on either the dev board nor the c2 module. I did try on an old wroom-32 dev board, and there it works.

I'm considering to just desolder the c2 from the dev board to my PCB, or replace the c2 with another variant.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32-C2 Wifi not working on module (storage driver issue)

Postby lbernstone » Sat Jun 01, 2024 6:33 pm

Ah, I was confused since you are asking this question in a forum titled "ESP32 Arduino"
The flash is not getting initialized for some reason. Configure your flash to use lowest common denominator settings- 2M flash, DIO mode, 40MHz. Make sure your partition table only goes to 2M.
Does esptool give you accurate information if you run esptool.py flash_info?

bruno192
Posts: 3
Joined: Thu May 30, 2024 1:55 pm

Re: ESP32-C2 Wifi not working on module (storage driver issue)

Postby bruno192 » Sat Jun 01, 2024 8:32 pm

I manged to get it to work using the static libraries. Using idf.py menuconfig XTAL had to change from 40Mhz to 26Mhz. I'm guessing it's the same when using arduino framework.

Who is online

Users browsing this forum: Google [Bot] and 60 guests