problem with esp32 pico D4 and memory flash

c4lic0
Posts: 1
Joined: Tue Nov 14, 2023 1:57 pm

problem with esp32 pico D4 and memory flash

Postby c4lic0 » Tue Nov 14, 2023 2:46 pm

I try to write to the flash memory of the esp32 pico D4 but it does not write any data, I am using the preferred library and I tried with spiffs and littlefs, but I cannot write with any, my code is here:

Code: Select all

#include <Preferences.h>
  Serial.begin(115200);
  preference.begin("my-app", false);

  unsigned int counter = preference.getUInt("counter", 0);
  
  // Increase counter by 1
  counter++;
  // Print the counter to Serial Monitor
  Serial.printf("Current counter value: %u\n", counter);
  
  // Store the counter to the Preferences
  preference.putUInt("counter", counter);
  // Close the Preferences
  preference.end();
  // Wait 10 seconds
  Serial.println("Restarting in 10 seconds...");
  delay(10000);
  // Restart ESP
  ESP.restart();
I am using platformio with vcode, my platformio.ini file is as follows:
[env:pico32]
platform = espressif32
board = pico32
framework = arduino
monitor_speed = 115200

I've tried this other one, but it doesn't work for me either.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino

However, when I use another esp32 it works normally

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

Re: problem with esp32 pico D4 and memory flash

Postby lbernstone » Wed Nov 15, 2023 7:21 am

try:
board_upload.flash_mode = dio

Who is online

Users browsing this forum: No registered users and 146 guests