-
Notifications
You must be signed in to change notification settings - Fork 492
Description
I have a program using LittleFS that works OK when not using PSRAM, but hangs when using PSRAM.
Here's a minimal demonstration:
#include <LittleFS.h>
uint32_t Workspace[10000] PSRAM;
const int len = 1000;
bool checkdata () {
for (int i=0; i<len; i++) if (Workspace[i] != i) return false;
return true;
}
void savedata () {
for (int i=0; i<len; i++) Workspace[i] = i;
if (checkdata()) Serial.println("Data setup OK");
LittleFS.begin();
File file;
file = LittleFS.open("/DATA.DAT", "w");
file.close();
}
void setup() {
Serial.begin(9600);
}
void loop() {
savedata();
Serial.println("Saved");
if (!checkdata()) Serial.println("Data error");
delay(5000);
}
The program simply opens and closes a file on LittleFS.
Running the program displays Data error indicating that LittleFS has corrupted the array Workspace. If you remove the PSRAM attribute from Workspace the program runs without error.
maxgerhardt
Metadata
Metadata
Assignees
Labels
No labels