LittleFS_Mbed_RP2040 on Nano RP2040

Has anyone successfully been able to store and retrieve data from the Nano RP2040's built in flash storage? I have attempted to use the LittleFS_Mbed_RP2040 module to read/write to it, but every time I attempt to init() the LittleFS_MBED file system it give an error: "[LFS] LittleFS Mount Fail". It then sits on "[LFS] Formatting... " forever.

I just have a very small amount of data I would like to store that I would normally use the EEPROM for, but obviously I can't since the Nano RP2040 Connect does not have an EEPROM.

Any advice is appreciated...

Here is the snip-it of code:
#include <LittleFS_Mbed_RP2040.h>
LittleFS_MBED *myFS;
void setup() {
myFS = new LittleFS_MBED();
file = String(MBED_LITTLEFS_FILE_PREFIX) + "/savedfile";
FILE *fout = fopen(file.c_str(), "w");
String s = "This is some text to get stored";
fwrite(s.c_str(), 1, sizeof(s), fout);
void loop() {

I'm afraid you have the same new board as mentioned in RP2040 Connect board has faulty components in newest purchase #318 and you're using mbed_nano core v2.4.1.

You can try downgrade the mbed_nano core to v2.3.1 and retest.

Just added to the library Important Notes to warn about the issue.

That was totally it! Thanks! It works perfectly now :slight_smile:

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