What is the Status with Teensy 4.1 EEPROM?
I am writing
Code:
//float FocusCalib[12][4];
Serial.println("***EEPROM WRITE***");
// Store Focus calibration data
addr = 0;
for (int i = 0; i < 12; i++) {
for (int j = 0; j < 4; j++) {
EEPROM.write(addr, *((uint8_t*)&FocusCalib[i][j]));
addr += 4;
}
}
and reading
Code:
// Read Focus calibration data
addr = 0;
for (int i = 0; i < 12; i++) {
for (int j = 0; j < 4; j++) {
*((uint8_t*)&FocusCalib[i][j]) = EEPROM.read(addr);
addr += 4;
}
}
The terminal connection gets erratic, it gets problematic to load new code, need to restart Arduino to do so.
How much emulated EEPROM there is? I read 4k, should this over all be avoided, what alternatives there is to store 1k data over power cycles ?
EDIT:
Did some testing, this works
Code:
EEPROM.write(1024, 123);
Serial.print(" EEPROM TEST "); Serial.println(EEPROM.read(1024));
so the problem was on the *((uint8_t*)&FocusCalib[i][j])