Introduction
This application note describes the error correction code (ECC) management and implementation on STM32 microcontrollers.
This document presents both the hardware and software aspects linked to the ECC mechanism used to protect the content of
internal memories. ECC protection with external memories is possible, however, its implementation is out of the scope of this
document.
This document presents: general information about ECC protection, detailed hardware ECC fault management, and details of
how ECC is implemented, with special focus on the STM32H5 and STM32H7 series microcontrollers. This document proposes
a specific implementation of the software part of the safety solution.
This document complements the reference documents, available on www.st.com.
Table 1. Applicable products
Type Products
Microcontroller STM32H5 series, STM32H7 series, STM32U5 series
Error correction code (ECC) management for internal memories protection on
STM32 microcontrollers
AN5342
Application note
AN5342 - Rev 4 - February 2023
For further information contact your local STMicroelectronics sales office.
www.st.com
1 General information
This document applies to STM32H5 series and STM32H7 series microcontrollers, which are Arm
®
based devices.
Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
Table 2. Acronyms and terms
Acronym Definition
ECC Error correction code
CPU Central processing unit (part of the MCU)
CRC Cyclic redundancy check
DED Double-error detection
DTCM Data-tightly coupled memory
FAR Falling address register
ISR Interrupt service routine
ITCM Instruction tightly coupled memory
MCU Microcontroller unit
MDMA Master direct-memory access
POR Power-on reset
RAM Random access memory
SEC Single-error correction
SRAM Static RAM
Reference documents
[1]
Reference manual STM32H503 Arm
®
-based 32-bit MCUs (RM0492)
[2]
Reference manual STM32H563/H573 and STM32H562 Arm
®
-based 32-bit MCUs (RM0481)
[3]
Reference manual STM32H7A3/7B3 and STM32H7B0 Value line advanced Arm
®
-based 32-bit MCUs (RM0455)
[4]
Reference manual STM32H745/755 and STM32H747/757 advanced Arm
®
-based 32-bit MCUs (RM0399)
[5]
Reference manual STM32H723/733, STM32H725/735, and STM32H730 Value line advanced Arm
®
-based 32-bit
MCUs (RM0468)
[6]
Reference manual STM32U5 Series Arm
®
-based 32-bit MCUs (RM0456)
[7] User manual STM32H7 dual-core safety manual (UM2840)
AN5342
General information
AN5342 - Rev 4
page 2/17