by: NXP Semiconductors
1 Introduction
There are three methods to implement EEPROM functionality. One is using
real EEPROM such as KEA64 which has 256 B EEPROM. The advantage is
it doesnt occupy the flash memory. But the disadvantage is, it is expensive.
The second method is using software to realize the EEPROM functionality such
as KEA8 and KEA128. The advantage is cheap. But the disadvantage is it
occupies the flash memory including the extra code for EEPROM realization
and the flash memory using to simulate EEPROM. The third method is using
firmware to realize the EEPROM functionality such as S32K1xx. The
advantage is the realization of EEPROM functionality is absolutely transparent
to customer and does not need flash memory to store extra code for EEPROM
implementation.
This application note mainly introduces S32K1xx EEPROM (EEE) functionality
feature and usage. The S32K1xx EEPROM (EEE) allows users to configure
some of the on-chip flash memory as enhanced EEPROM, additional flash
memory, or a combination of the two.
For detailed information for any reference mentioned during this application
note, please refer to S32K1xx Reference Manual and Datasheet.
2 S32K1xx EEPROM (EEE) features
The S32K1xx EEPROM (EEE) has a number of features that allow the
replacement of external EEPROMs and improves upon their performance.
S32K1xx EEE features include:
Automatic – does not require customer software development.
Reset: EEE image loaded into RAM.
Reads: Records read directly from RAM. No EEE operation.
Writes: Records written directly to RAM. Image automatically
synchronized with EEE flash.
Utilizes best practices to optimize reliability and cycling endurance.
Round robin load leveling.
Sector retirement.
Brownout tolerant.
New Quick Write mode priority-writes small amount of data before power loss.
Already proven in production.
More than 150M C90TFS industrial and consumer units in the field.
Contents
1 Introduction..........................................1
2 S32K1xx EEPROM (EEE) features......1
2.1 S32K1xx EEE works...............2
2.2 How S32K1xx EEE uses
memory................................... 2
3 Using the S32K1xx EEE...................... 4
3.1 S32K1xx EEE partitioning.......5
3.2 S32K1xx FlexRAM
configuration..........................10
3.3 S32K1xx command error
handling.................................14
3.4 S32K1xx EEE ECC error
handling.................................14
3.5 S32K1xx EEE startup........... 14
3.6 S32K1xx reading and
writing the EEE......................15
4 S32K1xx EEE performance............... 16
5 S32K1xx brownout detection............16
6 S32K1xx new quick write mode........17
7 S32K1xx EEPROM endurance.......... 18
8 Software considerations................... 19
8.1 Simultaneous operations.......19
8.2 Enabling CSEc and
EEPROM...............................19
8.3 Power-On recommendation...19
8.4 Data record checking............ 20
8.5 Power Modes transition.........20
9 Appendix A EEPROM examples.......20
10 Revision history............................... 23
AN11983
Using the S32K1xx EEPROM Functionality
Rev. Rev. 2 — May 2019
Application Note
2.1 S32K1xx EEE works
To provide enhanced EEPROM functionality, the S32K1xx EEE uses a RAM block (FlexRAM), a flash block (FlexNVM), and EEE
state machine. When the EEE functionality is enabled, the FlexRAM becomes your EEE memory. The FlexRAM address space
is where you access all of your EEE data. When the EEE is accessed, the EEE state machine keeps track of the data and backs
it up as data records, stored in some portion of the FlexNVM used as an E-flash. Using a large block of E-flash to back up the
data for a smaller amount of EEE data allows the S32K1xx EEE implementation to offer extremely high endurance. The EEE state
machine uses 72-bit records to backup data from the EEE into the flash (E-Flash). Thirty two bits of the record are used for the
data, and the other 40 bits are address, status and parity information about the data. The data records are written and erased as
needed. This means that if a location within the EEPROM has never been accessed, there will be no data record for it. This helps
to reduce the amount of data that needs to be backed up and can increase the memory endurance.
2.2 How S32K1xx EEE uses memory
S32K1xx have two separate blocks of flash, the P-Flash block and the FlexNVM block. The P-Flash block is intended to be used
as the program flash block, but it can also be used for storing both instructions and data. The FlexNVM block is a configurable
flash block that can be used as additional flash space (D-flash), as backup memory for supporting the enhanced EEPROM
functionality (E-flash), or as a combination of the two.
The portions of the FlexNVM not used as EEE backup memory (E-flash) are referred to as D-flash. This flash would
typically be used for data storage space; however, like the P-flash, D-flash can actually be used for instructions or
data.
NOTE
S32K1xx consists of the FlexNVM block, FlexRAM, and EEE state machine. These three blocks together are required to support
the EEE functionality. Figure 1. on page 2 shows the S32K1xx Memory Map.
Figure 1. S32K1xx Memory Map
Special considerations need to be taken for S32K148, in which, FlexNVM block is shared with 448 kB of P/DFlash. Software
considerations describes detailed information for these considerations.
NXP Semiconductors
S32K1xx EEPROM (EEE) features
Using the S32K1xx EEPROM Functionality, Rev. Rev. 2, May 2019
Application Note
2 / 24