Writing/Reading data using EEPROM library on Teensy 4.1

Fermuto

Member
Hello, My project requires storing a decent amount of variables between resets as a sort of "settings" configuration. I saw the EEPROM library and know that usually, it would write to the rather limited (in terms of write/erase cycles) EEPROM of the Teensy. However, according to this thread:

https://forum.pjrc.com/threads/62401-Store-variable-value-to-recover-after-reset

The library will actually use the flash memory where the program and everything else is stored if used on a Teensy 4.1. The problem is, how would my usage of the library work since the methods require specifying an address? The info about the library on the PJRC website seems to only concern the Teensy 3 and 2, and the library's documentation from Arduino sources doesn't mention the Teensy.

Thanks!
 
Hello, My project requires storing a decent amount of variables between resets as a sort of "settings" configuration. I saw the EEPROM library and know that usually, it would write to the rather limited (in terms of write/erase cycles) EEPROM of the Teensy.

If you go to the "Memory" description on the main T4.1 product page (<here>), you'll see that there are 4284 bytes of emulated EEPROM, which is accessed using the EEPROM Library (documented <here>).

Hope that helps . . .

Mark J Culross
KD5RXT
 
If you go to the "Memory" description on the main T4.1 product page (<here>), you'll see that there are 4284 bytes of emulated EEPROM, which is accessed using the EEPROM Library (documented <here>).

Hope that helps . . .

Mark J Culross
KD5RXT
Oh, that actually makes sense that it would just be emulated on the flash memory. Thanks!
 
Back
Top