i.MX RT1170 covers auto area, so, compared with previous i.MX RT product
like i.MX RT1060, the ECC feature is enhanced a lot. For use case with high
safety level requirement, we need to detect the ECC error when it happens and
informs application system to decide how to process this error.
This document discusses the ECC application on memory, including TCM,
Cache, OCRAM and external memory, and shares some key points and
experience. It does not cover ECC application on peripherals like FlexSPI,
Fuse, OCOTP, CSI, MIPI CSI, MIPI DSI, ENET QOS and FLEX CAN.
For memory ECC application on i.MX RT1170, we need to consider:
[CM7] CacheCACR &= ~ECCEN_MskNo, enabled by default.
[CM4] TCM/LMEM
SCB->DTCMCR |
= SCB_DTCMCR_RMW_Msk;
FLEXRAM_CTRL |= TCM_ECC_EN_Msk
LMDR0 |= 0xB;
LMDR1 |= 0xB;
(By CM4 only)
Yes, if 0x840[15] fused.
Yes, if 0x840[2] fused.
Table continues on the next page...
i.MX RT1170 ECC Application, Rev. 0, 03/2021
Application Note2 / 8
NXP Semiconductors
Table 3. SW configurations related with ECC (continued)
ItemsSW config requirementExecuted by ROM?
LMDR2 |= 0xF0;
Fuse setting implementation by MCU boot utility tool
[CM4] Cache
[CM7/CM4] OCRAM1/OCRAM2
[CM7/CM4] OCRAM from CM7 FlexRAM FLEXRAM_CTRL |= OCRAM_ECC_EN_Msk No
[CM7/CM4] OCRAM from CM4
TCM/LMEM
[CM7/CM4] XECCXECC_ECC_CTRL |= 7;No
LMDR3 |= 0xF0;
(By CM4 only)
MECC1_PIPE_ECC_EN |= ECC_EN_Msk
MECC2_PIPE_ECC_EN |= ECC_EN_Msk
LMDR0 |= 0xB;
LMDR1 |= 0xB;
(By CM4 only)
No
Yes, if 0x840[2] fused.
Yes, if 0x840[2] fused.
4 Fuse setting implementation by MCU boot utility tool
MCU boot utility tool is used for fuse setting.
1. Config boot mode, config power jumper (not a must), and connect USB1 port, as shown in Figure 1.
Figure 1. Hardware setup
2. Launch MCU boot utility tool, with PID and VID recognized correctly.
i.MX RT1170 ECC Application, Rev. 0, 03/2021
Application Note3 / 8
NXP Semiconductors
Figure 2. PID and VID recognized
3. Uncheck One Step in Figure 2.
4. In Figure 2, click Connect to ROM and Figure 3 appears.
Fuse setting implementation by MCU boot utility tool
Figure 3. Connect to Flashloader
5. In Figure 3, click Connect to Flashloader, and go to the eFuse Operation Utility panel, as shown in Figure 4.
i.MX RT1170 ECC Application, Rev. 0, 03/2021
Application Note4 / 8
NXP Semiconductors
Figure 4. eFuse Operation Utility panel
Preloading operation
6. In Figure 4, press the Scan button, and the fuse values are loaded, as shown in Figure 5. You can edit fuse values and press
the Burn button to implement new fuse setting to chip.
Figure 5. Fuse values
5 Preloading operation
For ECC memory region, before reading, all the memory space must be written to fill correct ECC value. Otherwise ECC error
events may occur when reading the memory. The first write operation is also called preloading.
i.MX RT1170 ECC Application, Rev. 0, 03/2021
Application Note5 / 8
NXP Semiconductors
ROM covers some preloading for some memory region depending on the fuse settings, as shown in Table 4.
For memory without ROM preloading, perform preloading in the ECC memory initialization.
Table 4. ROM preloading
ItemsPreloading by ROM
[CM7] TCM from CM7 FlexRAMYes, if 0x840[15] and 950[0] fused.
[CM7] Cache—
[CM4] TCM/LMEMYes, if 0x840[2] and 950[0] fused
[CM4] Cache—
[CM7/CM4] OCRAM1/OCRAM2Yes, if 0x840[2] and 950[0] fused
[CM7/CM4] OCRAM from CM7 FlexRAM—
[CM7/CM4] OCRAM from CM4 TCM/LMEMYes, if 0x840[2] and 950[0] fused
[CM7/CM4] XECC—
ECC error injection
6 ECC error injection
Error injection provides a way for debug purpose. Typically, we cannot see ECC error in application. To validate that ECC feature
is working as expected, we can inject some error bits into memory. When accessing the memory with error bits, we can see
ECC failure. After ECC error injection finishes, the ECC error injection feature must be disabled and then the system can keep
running correctly.
Table 5 lists the memory regions which support ECC error injection.
Table 5. ECC error injection
ItemsError injection support
[CM7] TCM from CM7 FlexRAM√
[CM7] Cache—
[CM4] TCM/LMEM—
[CM4] Cache—
[CM7/CM4] OCRAM1/OCRAM2√
[CM7/CM4] OCRAM from CM7 FlexRAM√
[CM7/CM4] OCRAM from CM4 TCM/LMEM—
[CM7/CM4] XECC√
7 SDK example related with ECC feature
In SDK, the following examples show the details about how to trigger ECC error by ECC error injection:
To run these example, fuse the bits mentioned in Table 2 first.
NOTE
Fuse operation is irreversible.
In addition, a demo code for MECC, AN13204SW, is provided together with this document to show the complete flow for:
• Error injection
• Disable error injection (After error injection, error injection feature must be disable for application)
• ECC error trigger and catch
It covers both MECC1 and MECC2.
8 Attentions for i.MX RT1170 ECC application
• For memory region with ECC enabled, write all the memory regions before reading. Otherwise, ECC failure may happen.
• Some memory is organized by 64 bit width (see Table 1 for details), so even a 32 bit write in fact is executed as:
1. Read 64 bit
2. Modify 32 bit in it
3. Write 64 bit back
So, in some condition, even a 32 bit write operation may trigger ECC error event by the first 64 bit reading accompany with it.
• The preloading operations listed in Table 4 are executed by ROM only when POR is detected. For some reset cases
with SNVS always powered on, ROM would not do preloading. After reset, it may lead to memory access ECC failure.
In SDK code, there is an operation to record and clear SRSR register. It is in SystemInit() function, controlled by
ROM_ECC_ENABLED macro, which is disabled by default. For ECC application, ROM_ECC_ENABLED should be enabled by
user. For application not based on NXP SDK, developer should take this into consideration for ECC application.
• ECC error injection does not discriminate master. Do not perform dynamic ECC error injection which will spoil data from
peripheral like DMA or other bus masters. Suggest to inject some error into specified memory address at the beginning,
and then disable ECC error injection feature during running time.
• For OCRAM mapped from CM4 TCM/LMEM:
— The enable/disable operation can only be done by CM4 core.
— For a single core chip, the ECC feature is enabled by default.
— It cannot trigger ECC interrupt for CM7 core (ERR050634).
9 References
•
i.MX RT1170 Processor Reference Manual
(document IMXRT1170RM)
10 Revision history
Revision numberDateSubstantive changes
103/2021Initial release
i.MX RT1170 ECC Application, Rev. 0, 03/2021
Application Note7 / 8
How To Reach Us
Home Page:
nxp.com
Web Support:
nxp.com/support
Information in this document is provided solely to enable system and software implementers to use NXP products. There
are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the
information in this document. NXP reserves the right to make changes without further notice to any products herein.
NXP makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor
does NXP assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any
and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided
in NXP data sheets and/or specifications can and do vary in different applications, and actual performance may vary over
time. All operating parameters, including “typicals,” must be validated for each customer application by customer's technical
experts. NXP does not convey any license under its patent rights nor the rights of others. NXP sells products pursuant to
standard terms and conditions of sale, which can be found at the following address: nxp.com/SalesTermsandConditions.
Right to make changes - NXP Semiconductors reserves the right to make changes to information published in this
document, including without limitation specifications and product descriptions, at any time and without notice. This
document supersedes and replaces all information supplied prior to the publication hereof.
Security — Customer understands that all NXP products may be subject to unidentified or documented vulnerabilities.
Customer is responsible for the design and operation of its applications and products throughout their lifecycles to reduce
the effect of these vulnerabilities on customer’s applications and products. Customer’s responsibility also extends to other
open and/or proprietary technologies supported by NXP products for use in customer’s applications. NXP accepts no
liability for any vulnerability. Customer should regularly check security updates from NXP and follow up appropriately.
Customer shall select products with security features that best meet rules, regulations, and standards of the intended
application and make the ultimate design decisions regarding its products and is solely responsible for compliance with all
legal, regulatory, and security related requirements concerning its products, regardless of any information or support that
may be provided by NXP. NXP has a Product Security Incident Response Team (PSIRT) (reachable at PSIRT@nxp.com)
that manages the investigation, reporting, and solution release to security vulnerabilities of NXP products.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, COOLFLUX,EMBRACE, GREENCHIP,