Memory Organization
105
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Architecture
Table 2-4. Flash Memory Banks and Sectors (continued)
Sector NO.
SECTOR SIZE
Low Address
High address
1
128K Bytes
0x001A_0000
0x001B_FFFF
2
128K Bytes
0x001C_0000
0x001D_FFFF
3
128K Bytes
0x001E_0000
0x001F_FFFF
4
128K Bytes
0x0020_0000
0x0021_FFFF
5
128K Bytes
0x0022_0000
0x0023_FFFF
6
128K Bytes
0x0024_0000
0x0025_FFFF
7
128K Bytes
0x0026_0000
0x0027_FFFF
8
128K Bytes
0x0028_0000
0x0029_FFFF
9
128K Bytes
0x002A_0000
0x002B_FFFF
10
128K Bytes
0x002C_0000
0x002D_FFFF
11
128K Bytes
0x002E_0000
0x002F_FFFF
Bank 7: 64K Bytes, dedicated for EEPROM emulation
0
16K Bytes
0xF020_0000
0xF020_3FFF
1
16K Bytes
0xF020_4000
0xF020_7FFF
2
16K Bytes
0xF020_8000
0xF020_BFFF
3
16K Bytes
0xF020_C000
0xF020_FFFF
2.2.3.2
ECC Protection for Flash Accesses
The RM48x microcontrollers protect all accesses to the on-chip flash memory by dedicated Single-Bit
Error Correction Double-Bit Error Detection (SECDED) logic.
The accesses to the program memory – flash bank 0 and flash bank 1, are protected by SECDED logic
implemented inside the ARM Cortex-R4F CPU. Accesses to the EEPROM emulation flash bank (bank 7)
are protected by dedicated SECDED logic inside the digital interface to the flash banks.
Both the SECDED logic implementations use Error Correction Codes (ECC) for correcting single-bit errors
and for detecting multiple-bit errors in the values read from the flash arrays. There is an 8-bit ECC for
every 64 bits of data. The ECC for the flash memory contents needs to be calculated by an external tool
such as nowECC. The ECC can then be programmed into the flash array along with the actual application
code.
The ECC for the flash array is stored in the flash itself, and is mapped to a region starting at 0xF040 0000
for the main flash banks 0 and 1, and to a region starting at 0xF010 0000 for the EEPROM emulation
flash bank 7.
NOTE:
ECC Protection Not Enabled By Default
The SECDED logic inside the CPU is not enabled by default and must be enabled by the
application.
Code Example for Enabling ECC Protection for Main Flash Accesses:
The following code example can be used to enable the ECC protection for accesses to the main flash
array.
MRC p15, #0, r1, c1, c0, #1
ORR r1, r1, #0x02000000
;Enable ECC checking for ATCM
DMB
MCR p15, #0, r1, c1, c0, #1
The ECC protection for accesses to the EEPROM emulation flash bank can be enabled by writing 0xA to
the EDACEN field of the flash module’s Error Correction Control Register 1 (FEDACCTRL1). See
for more details.