I started using a new teensy 3.2 for some code that references EEPROM data. The code works on another older 3.2. In trying to debug the code I extracted the part of the larger program to only include the problem area.
The code isn't complicated. Get the size of the EEPROM and byte by byte set it to 0. When I run the program it never gets past the 1st location because the function EEPROM.isReady() never returns true. Do I have a bad Teensy or am I missing something?
Serial Started
2048
0
0
The code isn't complicated. Get the size of the EEPROM and byte by byte set it to 0. When I run the program it never gets past the 1st location because the function EEPROM.isReady() never returns true. Do I have a bad Teensy or am I missing something?
Serial Started
2048
0
0
Code:
#include <EEPROMex.h>
#include <EEPROMVar.h>
void setup() {
unsigned long delayStart = millis();
Serial.begin(115200);
while (!Serial && (millis() - delayStart) <= 1000);
Serial.println("Serial Started");
// put your setup code here, to run once:
Serial.println(EEPROMSizeTeensy32);
// erase the whole eeprom
for (int i = 0; i < EEPROMSizeTeensy32; i++)
{
Serial.println(i);
Serial.println(EEPROM.isReady());
while (!EEPROM.isReady()); //wait until eeprom is ready
EEPROM.updateInt(i, (byte) 0);
}
}
void loop() {
// put your main code here, to run repeatedly:
}