没有合适的资源?快使用搜索试试~ 我知道了~
首页S32K1xx EEPROM 介紹
资源详情
资源评论
资源推荐

Using the S32K1xx EEPROM Functionality
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 doesn’t 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.
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...................... 5
3.1 S32K1xx EEE partitioning.......5
3.2 S32K1xx FlexRAM
configuration..........................10
3.3 S32K1xx command error
handling.................................14
3.4 S32K1xx EEE startup........... 14
3.5 S32K1xx reading and
writing the EEE......................14
4 S32K1xx EEE performance............... 15
5 S32K1xx brownout detection............16
6 S32K1xx new quick write mode........16
7 S32K1xx EEPROM endurance.......... 17
8 Software considerations................... 18
8.1 Simultaneous operations.......18
8.2 Enabling CSEc and
EEPROM...............................18
8.3 Power-On recommendation...18
8.4 Data record checking............ 19
8.5 Power Modes transition.........19
9 Appendix A EEPROM examples....... 19
10 Revision history............................... 22
NXP Semiconductors
Document Number: AN11983
Application Note Rev. 1, March 2018

— 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.
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 3 shows the S32K1xx Memory Map.
S32K1xx EEPROM (EEE) features
Using the S32K1xx EEPROM Functionality, Rev. 1, March 2018
2
NXP Semiconductors

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.
The sub sections below uses S32K144’s memory map as reference for different EEE configurations. Same principle applies to
different S32K1xx devices considering their own memory sizes/addresses.
2.2.1
S32K1xx with EEE functionality disabled
The figure below shows how the memory blocks function about S32K144, if the EEE functionality is disabled.
Figure 2. S32K144 Memory Block (Flash and NVM) with EEE disabled
S32K1xx EEPROM (EEE) features
Using the S32K1xx EEPROM Functionality, Rev. 1, March 2018
NXP Semiconductors
3

The P-Flash memory is always a P-Flash. Its functionality does not change for any FlexMemory configuration. Because the EEE
functionality is not used in this case, the entire FlexNVM is allocated as D-flash space (no E-flash is needed). The FlexRAM
becomes a 4 kB traditional RAM. This means it can be used as extra memory space, but keep in mind that it does run at the flash
clock speed and not the core speed (the tightly coupled memory RAM, TCM, runs at the core speed). The EEE state machine is
present in the device, but not active.
No ECC is generated for FlexRAM used as traditional RAM.
NOTE
2.2.2 S32K1xx with EEE functionality enabled
The figure below shows how the memory blocks function, if the EEE functionality is enabled and the entire FlexNVM is used to
back up the EEE data.
Figure 3. S32K1xx Flash EEE with EEE enabled (Entire FlexNVM used to backup EEE data)
There are a number of configuration options that can be used when the EEE functionality is enabled. Figure 3. on page 4 shows
an example of where the entire FlexNVM is used as E-flash memory. The FlexRAM becomes the EEE memory space (up to 4
kB). Any reads and writes of the EEE data uses this 4 kB memory space because the E-flash is not directly accessible. The EEE
state machine automatically manages all of the writes to the EEE memory space, and generates flash program and erase
operations as needed into the E-flash.
2.2.2.1
E-flash and EEE memory configuration details
Figure 3 shows the memory blocks at a high level and shows the respective functionality of the configurable memory blocks. This
section describes the actual use of the E-flash and FlexRAM blocks to create a EEE subsystem in more detail and provide
examples of some different configurations. S32K1xx allows for many different memory configuration options. The amount of EEE
data and the amount of E-flash memory used to backup that EEE data are all programmable. This allows you to make trade-offs
between the memory size and endurance of the EEE.
There are two programmable options that are used to define the exact memory use for a system. These parameters are:
1. EEE size — This is the total size of the EEE data needed. The total EEE size can be 0 or 4 kB for S32K14x devices and
0 or 2 kB for S32K11x devices.
2. FlexNVM partition — This parameter defines how much of the FlexNVM is used as normal flash (D-flash) and how much
is used as EEE backup memory (E-flash). If EEE is used, then at least 32 kB (For S32K14x devices) or 24 kB (For S32K11x
S32K1xx EEPROM (EEE) features
Using the S32K1xx EEPROM Functionality, Rev. 1, March 2018
4
NXP Semiconductors

devices) of the FlexNVM must be allocated as E-flash. To get the maximum possible endurance from the EEE, then the
entire FlexNVM can be used as E-flash.
FlexNVM endurance is impacted by the relationship between EEE backup memory and EEE size. See S32K1xx datasheet for
detailed information about NVM reliability specifications.
3 Using the S32K1xx EEE
3.1 S32K1xx EEE partitioning
To use the EEE features, the memory has to be partitioned. The partitioning process tells the state machine how much EEE
memory will be used and how much of the FlexNVM flash will be used to back up the EEE. The flash has a special program
partition command that is used to configure the EEE. The program partition command is used to program the two EEE
configuration parameters described in E-flash and EEE memory configuration details. These two parameters are programmed
into a special location within the flash block itself. As this is a non-volatile storage location, the partitioning needs to be done only
once in the entire lifetime of the device. Before launching the program partition command the FlexNVM and D-flash IFR must be
in an erased state. It is recommended that a new device is partitioned as the first step in factory programming.
Partitioning must only be done once. If the flash is re-partitioned for a different configuration, then recorded data
is lost and you are not guaranteed to get the expected endurance.
NOTE
Partitioning information, EEE data, and EEE location information is lost if a device is mass erased. Use of a
backdoor key is highly recommended when enabling security on a device where the EEE is being used. The
backdoor key allows for a means of disabling security temporarily without needing to perform a mass erase. If a
mass erase is used instead then the endurance of the EEE can no longer be guaranteed. CSEc enabled parts are
required to do DBG_AUTH command prior to any mass erase.
NOTE
3.1.1 S32K1xx program partition command
The program partition command prepares the FlexNVM block for use as data flash, emulated EEPROM backup, or a combination
of both and initializes the FlexRAM. For detailed information see S32K1xx’s reference manual. The table below shows parameters
needed for partition command.
Table 1. Program partition command
FCCOB Number FCCOB Contents [7:0]
0 0x80 (PGMPART)
1 CSEc Key Size
2 SFE
3
FlexRAM load during reset option (only bit 0 used):
0 - FlexRAM loaded with valid EEPROM data during reset sequence
1- FlexRAM not loaded during reset sequence
4 EEPROM Data Set Size Code
5 FlexNVM Partition Code
Using the S32K1xx EEE
Using the S32K1xx EEPROM Functionality, Rev. 1, March 2018
NXP Semiconductors
5
剩余23页未读,继续阅读


















愛德華117
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制

评论0