Teensy 3.2 EEPROM

Status
Not open for further replies.
How does this work?

From what I read the MK20DX has 32Kbyte of FlexRAM that seems mirror to Flash and the spec for the Teensy 3.2 says 2Kbyte EEPROM. Am I right in assuming that the processor manages the 16 x 2Kbyte pages in order to get extended life through an internal state machine? I assume that the code makes all this transparent?

How do you access the EEPROM?

Looking at the /library/Teensy it identifies an EEPROM class with get and put function instead of the familiar read/write functions. Are there any code examples?
 
Are there any code examples?

Yes. In Arduino, click File > Examples > EEPROM.

The examples cover both get/put and read/write. If read/write are familiar and your preference, perhaps open the "eeprom_read" and "eeprom_write" examples from than menu.

Inside the chip is a module NXP (formerly Freescale) calls "FlexNVM". It has 2K RAM and 32K flash. You can find info about how it works and how it wear levels in the reference manual.

https://www.pjrc.com/teensy/datasheets.html

The core library code which uses the FlexNVM is here:

https://github.com/PaulStoffregen/cores/blob/master/teensy3/eeprom.c

Generally you should not mess with that core library code, but if you *really* want to look at the details, it's all there for you to see.
 
Thanks very much Paul I'm sure this will help. The other thing I'm looking for is performance. I found it much easier using an I2C EEPROM with the M0 processor as I've used this on previous projects and is fast and doesn't suffer from wear-out in the life time of the project. But I thought I'd try the M4 EEPROM to see if it saves a chip?
 
What I should have said was 'fast enough' as I only store config data, e.g. 9DOF calibration constants for an AHRS. It also has a larger capacity; the one I use has 128KByte.
 
Status
Not open for further replies.
Back
Top