Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attemptes to write to flash stall/crash dvi output #50

Open
Mice96 opened this issue Jun 20, 2023 · 0 comments
Open

Attemptes to write to flash stall/crash dvi output #50

Mice96 opened this issue Jun 20, 2023 · 0 comments

Comments

@Mice96
Copy link

Mice96 commented Jun 20, 2023

I've already seen and read both #21 and #35. #35 just describes a work around which does work for EEPROM but not for littleFS and #21 is just about external flash. On any attempt to write to flash using littleFS both dvi output and the rest of the code crashes, stalls, locks up idk exactly what.
Heres the code I used to test this

#include <PicoDVI.h>
#include <LittleFS.h>
DVIGFX8 display(DVI_RES_320x240p60, true, adafruit_feather_dvi_cfg);
void setup() {  // Runs once on startup
  Serial.begin(9600);
  while (!Serial)
    delay(10);  // Wait for Serial Monitor to open
  Serial.println("Serial started");

  LittleFSConfig cfg;
  cfg.setAutoFormat(true);
  LittleFS.setConfig(cfg);
  
  if (!LittleFS.begin()) {  // Blink LED if insufficient RAM
    Serial.println("LittleFS failed to start");
  } else {
    Serial.println("LittleFS started");
  }

  if (!display.begin()) {  // Blink LED if insufficient RAM
    pinMode(LED_BUILTIN, OUTPUT);
    for (;;)
      digitalWrite(LED_BUILTIN, (millis() / 1000) & 1);
  }
  Serial.println("display started");

  display.setColor(0, 0x0000);  // Color 0: Black
  display.setColor(1, 0xFFFF);  // Color 1: White
  Serial.flush();
}

void loop() {
  display.fillScreen(1);
  delay(3000);
  display.fillScreen(0);
  delay(3000);

  File testFile = LittleFS.open("/Test.txt", "w");
  Serial.println("LittleFS.open");

  testFile.close();
  Serial.println("testFile.close()");

  delay(5000);
  Serial.println("delay(5000);");

  display.swap(false, true);
  Serial.println("display.swap");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant