I'm using Teensy 4.1 on Win 11 with IDE 2.0.3. I have a structure that I want to store in EEPROM named EEPROMData. This may be a stupid question, but what does this statement do?
EEPROMData.currentWPM = currentWPM;
I want to store the current words/minute (Morse code) in EEPROM so it is persisted across power cycles. It appears that the assignment "works" while the app is running, but power cycle and the change is lost. If I use EEPROM.put(), the data is persisted across power cycles. Using EEPROM.write() also works, but with the disadvantage that I need to know the offset. Also, if I use write() instead of put(), does the write() count as a EEPROM life cycle for all of the emulated EEPROM, or just the count for the block dedicated to EEPROMData? I think I remember seeing that the wear leveling algorithm works on 4K blocks. Is that correct?
Thanks!
EEPROMData.currentWPM = currentWPM;
I want to store the current words/minute (Morse code) in EEPROM so it is persisted across power cycles. It appears that the assignment "works" while the app is running, but power cycle and the change is lost. If I use EEPROM.put(), the data is persisted across power cycles. Using EEPROM.write() also works, but with the disadvantage that I need to know the offset. Also, if I use write() instead of put(), does the write() count as a EEPROM life cycle for all of the emulated EEPROM, or just the count for the block dedicated to EEPROMData? I think I remember seeing that the wear leveling algorithm works on 4K blocks. Is that correct?
Thanks!