Esp32 With SPIFFS

Hi all. I'm a beginner in arduino ESP32. Right now I had to make the programin ESP32 and that program need to read and write some configuration from SPIFFS in ESP32 memory. So the problem from my code had happeing in setup as my source in below

#include "FS.h"
#include <SPIFFS.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(baudRate);
  
  Serial.println("Start Setup Stone");
  state = "connectWifi";

  if (!SPIFFS.begin()) {
    Serial.println("Failed to mount SPIFFS");
    return;
  }
}

From this code I try in same develop board that work. When I use to my custom pcb some that work and some can mount SPIFFS and some can't mount on that, Even in custom PCB I use in some develop board ESP32 same series some can and some can't. Anyone could guide to me how to troubleshoot on this problem please.

Thank you.

The SPIFFS_Test.ino example include the option to format SPIFFS, if needed. See if this helps.

if (!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)) {
    Serial.println("SPIFFS Mount Failed");
    return;
}
1 Like

Thank you. I keep try.

If it works on the development board (NodeMCU, Devkit etc) and not on your custom pcb it sounds like a hardware problem.
I'd suggest you compare the connections on your custom pcb with those on the development boards.

I had try and follow in recommend from esp32 datasheet. For nodeMCU how I find the datasheet?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.