Flash Empty Check; Flash Error Code Correction (Ecc); Table 11. Flash Memory Organization For 512 Kbytes Dual-Bank Devices - ST STM32G0 1 Series Reference Manual

Table of Contents

Advertisement

RM0444

Table 11. Flash memory organization for 512 Kbytes dual-bank devices

Information
block
Main
memory
3.3.2

FLASH empty check

During the OBL phase, after loading all options, the Flash memory interface checks whether
the first location of the Main memory is programmed. The result of this check in conjunction
with the boot0 and boot1 information is used to determine where the system has to boot
from. It prevents the system to boot from Main Flash memory area when i.e. no user code
has been programmed.
The Main Flash memory empty check status can be read from the EMPTY bit in
access control register
status by writing an appropriate value to the EMPTY bit.
3.3.3

FLASH error code correction (ECC)

Data in Flash memory words are 72-bits wide: eight bits are added per each double word
(64 bits). The ECC mechanism supports:
One error detection and correction
Two errors detection
When one error is detected and corrected, the flag ECCC (ECC correction) is set in
ECC register
When two errors are detected, a flag ECCD (ECC detection) is set in
(FLASH_ECCR). In this case, a NMI is generated.
When an ECC error is detected, the address of the failing double word is saved in
ADDR_ECC[16:0] bitfield of the FLASH_ECCR register. ADDR_ECC[2:0] are always
cleared. The bus-ID of the CPU accessing the address is saved in CPUID[2:0].
While ECCC or ECCD is set, FLASH_ECCR is not updated if a new ECC error occurs.
FLASH_ECCR is updated only when ECC flags are cleared.
Area
Bank 1
0x1FFF 7800 - 0x1FFF 787F
Bank 1
0x1FFF 7000 - 0x1FFF 73FF
Bank 1
0x1FFF 0000 - 0x1FFF 6FFF
0x0807 F804 - 0x0807 FFFF
Bank 2
0x0804 1000 - 0x0804 17FF
0x0804 0800 - 0x0804 0FFF
0x0804 0000 - 0x0804 07FF
0x0803 F800 - 0x0803 FFFF
Bank 1
0x0800 1000 - 0x0800 17FF
0x0800 0800 - 0x0800 0FFF
0x0800 0000 - 0x0800 07FF
(FLASH_ACR). Software can modify the Main Flash memory empty
(FLASH_ECCR). If ECCCIE is set, an interrupt is generated.
Addresses
...
...
RM0444 Rev 5
Embedded Flash memory (FLASH)
Size (bytes)
128
1 K
28 K
2 K
...
2 K
2 K
2 K
2 K
...
2 K
2 K
2 K
FLASH ECC register
Memory
type
Option bytes
OTP area
System memory
Page 383
...
Page 258
Page 257
Page 256
Page 127
...
Page 2
Page 1
Page 0
FLASH
FLASH
71/1390
118

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G0 1 Series and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF