WaiveCar / WaiveTelem

Repository for files related to the waivetelem project
0 stars 0 forks source link

Investigate memory issues. #30

Closed jlandau10 closed 4 years ago

jlandau10 commented 5 years ago

Sometimes the config files disappear from the sd card. May be due to power cycle during write.

Figure out why it’s happening and how to prevent.

Switch to permanent memory chip?

ravelab commented 5 years ago

switch to permanent memory chip might not solve the issue as it is still flash memory.

comment out this in logger.cpp so that we are not writing to file, config files seems to not disappear now.

// writeFile = SD.open("LOG.TXT", FILE_WRITE); // if (!writeFile) { // logError("LOG.TXT open failed"); // return -1; // }

// logAddSender(toFile);

ravelab commented 5 years ago

move MQTT config to EEPROM so if there is a corrupted SD at least there is a way to remotely download CONFIG.TXT again.

ravelab commented 4 years ago

if CONFIG.TXT doesn't exist or cannot open, try to download it from S3 automatically.

ravelab commented 4 years ago

maybe copy from DEFAULT.CFG to CONFIG.TXT?

ravelab commented 4 years ago

canbus gets stuck when log to file is enabled. Weird

ravelab commented 4 years ago

sometimes the CONFIG.TXT file is on SD, but cannot read it. Need to reinsert again

ravelab commented 4 years ago

https://www.microchip.com/forums/m922582.aspx

ravelab commented 4 years ago

a newer one, base on the same code, that uses beginTransaction https://github.com/arduino-libraries/SD. So if we switch to the newer SD, it might allow multiple slaves with different speed on the SPI.

ravelab commented 4 years ago

seems to be fixed