ECC Error Handling
ECC Error Handling
Contents
1 Introduction 1 Introduction.......................................... 1
Error Correction Code, or ECC, is commonly utilized with memories in 2 SRAM ECC error handling.................. 1
applications where data corruption via soft-errors is not easily tolerated.
3 FLASH ECC error handling................. 3
Software errors can be caused by radiation (a neutron or alpha particles),
electro-magnetic interference, electrical noise, or a short circuit between cells. 4 References........................................... 4
The ECC method used in S32K1xx family, provide Single Error Correction (SEC) and Double Error Detection (DED) capability.
This application note is intended to describe how the ECC protection is implemented in S32K1xx family and understand the
particular ECC event response for S32K14x and S32K11x devices. It also offers some software examples for illustration of
mentioned behavior.
NOTE
The SRAM_L is not ECC protected for the S32K11x devices. The FlexRAM used as system RAM is not ECC
projected. LPUART and FlexCAN RAM are ECC protected.
The reset state of the SRAM is unknown, thus data may contain random data. Most probably the first read attempt to any address
would generate non-correctable ECC error. It is essential that each memory address be written to a known value before being
read. If an uninitialized memory address is read, it is likely the read will result in a multiple-bit ECC error and an errored transaction
on the AHB. Therefore, the SRAM must be initialized after power-up and this includes the peripherals RAM memories as the
LPUART and FlexCAN RAMs.
2. With an appropriate functional safety mechanism to manage the fault: The MCU detects the fault (fault detection time)
and then corrects it (fault reaction time). At this point the software has to switch to a safe_state_system (a safe_state_system
is an operating mode without an unreasonable probability of occurrence of physical injury or damage to the health of any
persons). The safe_state_system has to be defined by the user.
3. Without any suitable functional safety mechanism: The MCU detects the fault (fault detection time) and then corrects
it but the user was not notified that an error happened. A hazard may appear after the Fault Tolerant Time Interval (FTTI)
has elapsed.
NOTE
It must be ensured that no read access is done onto SRAM_U during hard fault exception handling or it will cause
core lock up. Hence, linker file should be updated such that stack, vector table, variables used in hard fault handler
etc. should not be in SRAM_U area. SRAM_L or FlexRAM can be used for this.
There are three ways to proceed, once this event has happened:
1. Normal MCU operation: The MCU detects the fault (fault detection time) and then reports it (fault reaction time).
2. With an appropriate functional safety mechanism to manage the fault: The MCU detects the fault (fault detection time)
and then reports it (fault reaction time).
3. Without any suitable functional safety mechanism: The MCU detects the fault (fault detection time). A hazard will appear
after the Fault Tolerant Time Interval (FTTI) has elapsed.
S32K14x S32K11x
0 SRAM_L SRAM_U
1 SRAM_U Reserved
For safety applications, it is recommended to check the ECC functionality injecting errors into the SRAM to check the reporting
of such errors.
NOTE
• If an uncorrectable error fault occurs during execution of a machine exception, a safe state shall be entered.
• The bus fault is disabled by default. Therefore, it will be getting escalated to hard fault.
CAUTION
Consider that the real flow is first jump into the BusFault (if enabled) before going into the Flash error handler.
NOTE
Cumulative programming of bits (back-to-back program operations without an intervening erase) within a flash
memory location is not allowed.
4 References
• S32K1xx Series Reference Manual by NXP semiconductors.
While NXP has implemented advanced security features, all products may be subject to
unidentified vulnerabilities. Customers are responsible for the design and operation of their
applications and products to reduce the effect of these vulnerabilities on customer’s applications
and products, and NXP accepts no liability for any vulnerability that is discovered. Customers
should implement appropriate design and operating safeguards to minimize the risks associated
with their applications and products.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, COOLFLUX,
EMBRACE, GREENCHIP, HITAG, I2C BUS, ICODE, JCOP, LIFE VIBES, MIFARE, MIFARE
CLASSIC, MIFARE DESFire, MIFARE PLUS, MIFARE FLEX, MANTIS, MIFARE ULTRALIGHT,
MIFARE4MOBILE, MIGLO, NTAG, ROADLINK, SMARTLX, SMARTMX, STARPLUG, TOPFET,
TRENCHMOS, UCODE, Freescale, the Freescale logo, AltiVec, C‑5, CodeTEST, CodeWarrior,
ColdFire, ColdFire+, C‑Ware, the Energy Efficient Solutions logo, Kinetis, Layerscape, MagniV,
mobileGT, PEG, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, Ready Play,
SafeAssure, the SafeAssure logo, StarCore, Symphony, VortiQa, Vybrid, Airfast, BeeKit,
BeeStack, CoreNet, Flexis, MXC, Platform in a Package, QUICC Engine, SMARTMOS, Tower,
TurboLink, UMEMS, EdgeScale, EdgeLock, eIQ, and Immersive3D are trademarks of NXP B.V.
All other product or service names are the property of their respective owners. AMBA, Arm, Arm7,
Arm7TDMI, Arm9, Arm11, Artisan, big.LITTLE, Cordio, CoreLink, CoreSight, Cortex,
DesignStart, DynamIQ, Jazelle, Keil, Mali, Mbed, Mbed Enabled, NEON, POP, RealView,
SecurCore, Socrates, Thumb, TrustZone, ULINK, ULINK2, ULINK-ME, ULINK-PLUS, ULINKpro,
µVision, Versatile are trademarks or registered trademarks of Arm Limited (or its subsidiaries) in
the US and/or elsewhere. The related technology may be protected by any or all of patents,
copyrights, designs and trade secrets. All rights reserved. Oracle and Java are registered
trademarks of Oracle and/or its affiliates. The Power Architecture and Power.org word marks and
the Power and Power.org logos and related marks are trademarks and service marks licensed
by Power.org.
© NXP B.V. 2019. All rights reserved.
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Date of release: July 2019
Document identifier: AN12522