16. SRAM configuration controller (RAMCFG)

16.1 RAMCFG introduction

The RAMCFG configures the features of the internal SRAMs (SYSRAM, RETRAM, SRAM1 and BKPSRAM).

16.2 RAMCFG main features

The internal SRAM supports some of the features listed hereafter, configured in RAMCFG:

16.3 RAMCFG functional description

16.3.1 Internal SRAM features

Four SRAMs are embedded in the STM32MP21xx devices, each with specific features:

The tables below summarize the features supported by each internal SRAM.

Table 67. Internal SRAM features

SRAM featureSYSRAMRETRAMSRAM1BKPSRAM
256 Kbytes128 Kbytes64 Kbytes8 Kbytes
LPBAM Stop/LP-Stop-XX-
Optional retention in \(V_{BAT}\) mode-X-X
Erase with tamper detection--XX
Hardware eraseXX--
Software eraseXXXX
ECC-X-X
CRC-X--

Table 68. Internal SRAM hardware erase feature

SRAM (size in Kbytes)Conditional hardware eraseCondition
SYSRAM low bank (128)NoErase done on each system reset
SYSRAM high bank (128)YesErase on system reset only once SYSRAM_ERASE in OTP HCONF1 is fused to 1
RETRAM (128)YesErase on system reset. Can be disabled by SRAMHWERDIS in RAMCFG_RETRAMCR.

16.3.2 Error code correction (RETRAM, BKPSRAM)

The ECC is supported by RETRAM and BKPSRAM.

Seven ECC bits are added per 32 bits of SRAM, allowing a 2-bit error detection and 1-bit error correction on memory read access.

As the ECC is calculated and checked for a 32-bit word, the byte and half-word write accesses are managed by the SRAM interface by first reading the whole word, then writing the word again with the new byte/half-word value. The ECC double errors are also detected during these byte or half-word AHB write accesses (read/modify/write done by interface). The byte or half-word write access latency is two AHB clock cycles.

Caution: In case of a byte or half-word write on SRAM with ECC, the read/modify/write operation is done in a buffer. The buffer content is written into the SRAM, two AHB clock cycles after the SRAM AHB is released (when SRAM is no more accessed).

Single- and double-ECC errors

When a single error is detected, it is automatically corrected and the SEC bit is set in RAMCFG_xISR. An interrupt is generated if enabled by SEIE in RAMCFG_xIER. The failing address is stored in RAMCFG_xSEAR if ALE is set in RAMCFG_xCR.

Caution: Single errors are not reported if the SEC flag is not cleared in time when a new error happens.

When a double error is detected, the DED bit is set in RAMCFG_xISR. An interrupt is generated if enabled by DEIE in RAMCFG_xIER. The failing address is stored in RAMCFG_xDEAR if ALE is set in RAMCFG_xCR.

Caution: Double errors are not reported if the DED flag is not cleared. Double errors are not corrected, and must be managed by exception.

The ECC can be activated / deactivated by executing the following software sequence:

  1. 1. Write 0xAE in RAMCFG_xECCKEYR.
  2. 2. Write 0x75 in RAMCFG_xECCKEYR.
  3. 3. Write 1 in the ECCE bit of RAMCFG_xCR to activate the ECC (write 0 in this bit to deactivate the ECC).

RETRAM ECC specific management

The ECC must be enabled on RETRAM to allow the CPU2 boot when exiting Standby modes in wake-up event mode (ignored in legacy boot mode). If a double error is detected during the wake-up phase, an application reset may be generated (reset always generated if the CPU2 is the trusted domain). Refer to Section 20: Reset and clock control (RCC) for more details.

This signal (combined with CRC check error) is also routed to the EXTI2 in order to wake up the CPU1.

16.3.3 Cyclic redundancy check (RETRAM)

The hardware CRC (32-bit CRC \(P(x) = x^{32} + x^{26} + x^{23} + x^{22} + x^{16} + x^{12} + x^{11} + x^{10} + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1\)) is supported by RETRAM.

The CRC module may be used to calculate a signature of part of the memory content (instruction code in RETRAM for the CPU2) before jumping in low-power mode. When exiting low-power mode, the CRC can be used to check, without any CPU intervention, that the value of the memory is not modified/alterated.

The CRC check can be launched by software or by hardware when exiting low-power modes as follows:

Refer to Section 19: Power control (PWR) for more details.

The following software sequence must be executed to calculate the signature of the memory content:

  1. 1. Write 0x0 in CRCC[1:0] of RAMCFG_RETRAMCCR1 to deactivate the CRC.
  2. 2. Write 1 in SRAMHWERDIS of RAMCFG_RETRAMCR to disable the hardware erase.
  3. 3. Select the buffer size to take into account during the CRC computation by setting CRCBS[2:0] in RAMCFG_RETRAMCCR1.
  4. 4. Write 0x1 in CRCC[1:0] of RAMCFG_RETRAMCCR1 to activate the CRC.
  5. 5. Write 1 in CRCCS of RAMCFG_RETRAMCCR2 to start the CRC computation.

The calculated signature is stored in RAMCFG_RETRAMCCSR when CRCEOC is set in RAMCFG_RETRAMCSR.

The following software sequence must be executed to check the memory content to prepare

the CRC signature used while exiting a low-power mode:

  1. 1. Write 0x0 in CRCC[1:0] of RAMCFG_RETRAMCCR1 to deactivate the CRC.
  2. 2. Write 1 in SRAMHWERDIS of RAMCFG_RETRAMCR to disable the hardware erase.
  3. 3. Select the buffer size to take into account during CRC computation by setting CRCBS[2:0] in RAMCFG_RETRAMCCR1.
  4. 4. Write 0x1 in CRCC[1:0] of RAMCFG_RETRAMCCR1 to activate the CRC.
  5. 5. Write 1 in CRCCS of RAMCFG_RETRAMCCR2 to start the CRC computation.
  6. 6. Wait until CRCEOC is set in RAMCFG_RETRAMCSR.
  7. 7. Read calculated signature in RAMCFG_RETRAMCCSR.
  8. 8. Write calculated signature in RAMCFG_RETRAMCRSR.
  9. 9. Write 1 in CRCFC of RAMCFG_RETRAMCCR2 to clear the CRCEOC flag.
  10. 10. Write 0x2 in CRCC[1:0] of RAMCFG_RETRAMCCR1 to enable the CRC computation and signature check.

When exiting a low-power mode, the CRC calculates the signature of the memory content and compares the signature against the precalculated signature.

If no error is detected during signature check, CRCSCS and CRCEOC are set in RAMCFG_RETRAMCSR.

RETRAM CRC specific management

The CRC computation and signature check must be enabled on RETRAM to allow the CPU2 boot when exiting Standby mode in wake-up event mode (ignored in the legacy boot mode). If the CRC check fails, the CPU2 is not allowed to boot and an application reset or a notification can be generated (reset always generated if the CPU2 is the trusted CPU). The CRC check is ignored in the legacy boot mode. See Section 20: Reset and clock control (RCC) for more details on the RETRAM CRC error system reset enable.

This signal (combined with the ECC DED) is also routed to the EXTI2 in order to wake up the CPU1.

16.4 RAMCFG low-power modes

Table 69. Effect of low-power modes on RAMCFG

ModeDescription
SleepNo effect. RAMCFG interrupts cause the device to exit Sleep mode.
StopThe content of RAMCFG registers is kept.
StandbyThe RAMCFG is powered down. Only few register bits are kept in Standby (see bit description for more details).

16.5 RAMCFG interrupts

Four interrupts are generated internally (all maskable by software) and a global interrupt request is exported to the interrupt controller. The table below gives the list of RAMCFG interrupt requests.

Table 70. RAMCFG interrupt requests

Interrupt acronymMemoryInterrupt eventEvent flag(1)Enable control bitInterrupt clear method
RAMCFGRETRAMECC single error detection and correctionSECSEIEWrite 1 in CSEC
ECC double error detectionDEDDEIEWrite 1 in CDED
BKPSRAMECC single error detection and correctionSECSEIEWrite 1 in CSEC
ECC double error detectionDEDDEIEWrite 1 in CDED

1. All these bits are in RAMCFG_RETRAMISR.

16.6 RAMCFG registers

The RAMCFG registers can be accessed in word, half-word, and byte format, unless explicitly specified differently.

16.6.1 RAMCFG SYSRAM control register (RAMCFG_SYSRAMCR)

Address offset: 0x000

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
ER
Res.Res.Res.Res.Res.Res.Res.Res.
rw

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMER: SRAM erase

This bit can be set by software only after writing the unlock sequence in ERASEKEY of RAMCFG_SYSRAMERASEKEY. Setting this bit starts the SRAM erase. This bit is automatically cleared by hardware at the end of the erase operation.

Bits 7:0 Reserved, must be kept at reset value.

16.6.2 RAMCFG SYSRAM interrupt status register (RAMCFG_SYSRAMISR)

Address offset: 0x008

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
BUSY
Res.Res.Res.Res.Res.Res.Res.Res.
r

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMBUSY: SRAM busy with erase operation

0: No erase operation ongoing

1: Erase operation ongoing

Note: Depending on the SRAM, the erase operation can be performed due to software request, system reset if the option is not disabled by software and tamper detection. Refer to Table 67: Internal SRAM features.

Bits 7:0 Reserved, must be kept at reset value.

16.6.3 RAMCFG SYSRAM erase key register (RAMCFG_SYSRAMERKEYR)

Address offset: 0x028

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ERASEKEY[7:0]: Erase write protection key

The following steps are required to unlock the write protection of SRAMER in RAMCFG_SYSRAMCR.

a) Write 0xCA into ERASEKEY[7:0].

b) Write 0x53 into ERASEKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.4 RAMCFG SRAM1 control register (RAMCFG_SRAM1CR)

Address offset: 0x080

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
ER
Res.Res.Res.Res.Res.Res.Res.Res.
rw

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMER: SRAM erase.

This bit can be set by software only after writing the unlock sequence in ERASEKEY of RAMCFG_MCURAM1ERASEKEY. Setting this bit starts the SRAM erase. This bit is automatically cleared by hardware at the end of the erase operation.

0: No erase operation ongoing

1: Erase operation ongoing

Bits 7:0 Reserved, must be kept at reset value.

16.6.5 RAMCFG SRAM1 interrupt status register (RAMCFG_SRAM1ISR)

Address offset: 0x088

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
BUSY
Res.Res.Res.Res.Res.Res.Res.Res.
r

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMBUSY: SRAM busy with erase operation

0: No erase operation ongoing

1: Erase operation ongoing

Note: Depending on the SRAM, the erase operation can be performed due to software request, system reset if the option is not disabled by software and tamper detection. Refer to Table 67: Internal SRAM features.

Bits 7:0 Reserved, must be kept at reset value.

16.6.6 RAMCFG SRAM1 erase key register (RAMCFG_SRAM1ERKEYR)

Address offset: 0x0A8

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ERASEKEY[7:0]: Erase write protection key

The following steps are required to unlock the write protection of SRAMER in RAMCFG_MCURAM1CR.

  1. Write 0xCA into ERASEKEY[7:0].
  2. Write 0x53 into ERASEKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.7 RAMCFG RETRAM control register (RAMCFG_RETRAMCR)

Address offset: 0x180

Reset value: 0x0000 0000

See individual bits for reset condition.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.SRAM
HWER
DIS
Res.Res.Res.SRAM
ER
Res.Res.Res.ALERes.Res.Res.ECCE
rwrsrwrs

Bits 31:13 Reserved, must be kept at reset value.

Bit 12 SRAMHWERDIS: SRAM hardware erase disable

Note: This bit is reset on a reset only by VSW POR and VSWRST.

Bits 11:9 Reserved, must be kept at reset value.

Bit 8 SRAMER: SRAM erase.

This bit can be set by software only after writing the unlock sequence in ERASEKEY of RAMCFG_RETRAMERASEKEY. Setting this bit starts the SRAM erase. This bit is automatically cleared by hardware at the end of the erase operation.

0: No erase operation ongoing

1: Erase operation ongoing

Note: This bit is reset on any system reset.

Bits 7:5 Reserved, must be kept at reset value.

Bit 4 ALE: Address latch enable

0: Failing address not stored in the RETRAMECC single/double error address registers

1: Failing address stored in the RETRAMECC single/double error address registers

Note: This bit is reset on any system reset.

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 ECCE: ECC enable

When set, this bit can be cleared by software only after writing the unlock sequence in RAMCFG_RETRAMECCKEYR.

0: ECC disabled

1: ECC enabled

Note: This bit is reset on an application reset.

16.6.8 RAMCFG RETRAM interrupt enable register (RAMCFG_RETRAMIER)

Address offset: 0x184

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEIESEIE
rwrw

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 DEIE: ECC double error interrupt enable

0: Double error interrupt disabled

1: Double error interrupt enabled

Bit 0 SEIE: ECC single error interrupt enable

0: Single error interrupt disabled

1: Single error interrupt enabled

16.6.9 RAMCFG RETRAM interrupt status register (RAMCFG_RETRAMISR)

Address offset: 0x188

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
BUSY
Res.Res.Res.Res.Res.Res.DEDSEC
rrr

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMBUSY: SRAM busy with erase operation

0: No erase operation ongoing

1: Erase operation ongoing

Note: Depending on the SRAM, the erase operation can be performed due to software request, system reset if the option is not disabled by software and tamper detection. Refer to Table 67: Internal SRAM features.

Bits 7:2 Reserved, must be kept at reset value.

Bit 1 DED: ECC double error detected

0: No double error

1: Double error detected

Bit 0 SEC: ECC single error corrected

0: No single error

1: Single error corrected

16.6.10 RAMCFG RETRAM ECC single error address register (RAMCFG_RETRAMSEAR)

Address offset: 0x18C

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.ESEA[14:0]
rrrrrrrrrrrrrrr

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:0 ESEA[14:0]: ECC single error address

When ALE is set in RAMCFG_RETRAMCR, this bitfield is updated with the word-address corresponding to the ECC single error.

16.6.11 RAMCFG RETRAM ECC double error address register (RAMCFG_RETRAMDEAR)

Address offset: 0x190

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.EDEA[14:0]
rrrrrrrrrrrrrrr

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:0 EDEA[14:0]: ECC double error address

When ALE is set in RAMCFG_RETRAMCR, this bitfield is updated with the word-address corresponding to the ECC double error.

16.6.12 RAMCFG RETRAM interrupt clear flag register (RAMCFG_RETRAMICR)

Address offset: 0x194

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CDEDCSEC
ww

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 CDED: Clear of ECC double error detected

Writing 1 to this flag clears DED in RAMCFG_RETRAMISR.

Bit 0 CSEC: Clear of ECC single corrected

Writing 1 to this flag clears SEC in RAMCFG_RETRAMISR.

16.6.13 RAMCFG RETRAM ECC key register
(RAMCFG_RETRAMECCKEYR)

Address offset: 0x1A4

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ECCKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ECCKEY[7:0]: ECC write protection key

The following steps are required to unlock the write protection of ECCE in RAMCFG_RETRAMCR.

  1. Write 0xAE into ECCKEY[7:0].
  2. Write 0x75 into ECCKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.14 RAMCFG RETRAM erase key register
(RAMCFG_RETRAMERKEYR)

Address offset: 0x1A8

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ERASEKEY[7:0]: Erase write protection key

The following steps are required to unlock the write protection of SRAMER in RAMCFG_RETRAMCR.

  1. Write 0xCA into ERASEKEY[7:0].
  2. Write 0x53 into ERASEKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.15 RAMCFG RETRAM CRC control register 1
(RAMCFG_RETRAMCCR1)

Address offset: 0x1B0

Reset value: 0x0000 0070

Not reset by wake-up from Standby mode, but by any application reset (such as NRST or IWDG).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCBS[2:0]Res.Res.CRCC[1:0]
rwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bits 6:4 CRCBS[2:0]: CRC buffer size

This bitfield is used to program the buffer size to take into account during CRC computation. Starting from RETRAM start address.

0x0: 16 Kbytes

0x1: 32 Kbytes

0x2: 48 Kbytes

.....

0x7: 128 Kbytes (default)

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 CRCC[1:0]: CRC configuration.

00: CRC disabled

01: CRC computation enabled. The calculated signature is stored in RAMCFG_RETRAMCCSR when the CRCEOC flag is set.

10: CRC computation and signature check enabled. The status of the signature check is available in RAMCFG_RETRAMCSR when the CRCEOC flag is set.

11: Reserved

16.6.16 RAMCFG RETRAM CRC control register 2
(RAMCFG_RETRAMCCR2)

Address offset: 0x1B4

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
CRCFCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCC
S
rw

Bit 31 CRCFC: CRC flags clear.

Setting this bit clears the CRC status flags in RAMCFG_RETRAMCSR.

0: CRC flags are not affected.

1: CRC flags are cleared in RAMCFG_RETRAMCSR.

Note: This bit is automatically cleared by hardware.

Bits 30:1 Reserved, must be kept at reset value.

Bit 0 CRCCS: CRC computation start

Setting this bit starts the CRC computation. This bit is automatically cleared by hardware at the end of the CRC computation phase.

0: CRC computation not launched

1: CRC computation launched

16.6.17 RAMCFG RETRAM CRC reference signature register (RAMCFG_RETRAMCRSR)

Address offset: 0x1B8

Reset value: 0x0000 0000

Not reset by wake-up from Standby mode, but by any application reset (such as NRST or IWDG).

31302928272625242322212019181716
CRCRS[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
CRCRS[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 CRCRS[31:0]: CRC reference signature.

This bitfield is used to write the reference signature (precalculated signature) used for CRC signature comparison check.

16.6.18 RAMCFG RETRAM CRC status register (RAMCFG_RETRAMCSR)

Address offset: 0x1BC

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCS CSCRCE OC
rr

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 CRCS: CRC signature check status flag

This bit is set when the computed signature matches the reference signature stored in RAMCFG_RETRAMCSRSR. This bit is valid only when the CRCEOC flag is set.

0: Fault detected is SRAM data. Calculated signature does not match the reference signature.

1: SRAM data is correct. Calculated signature matches the reference signature.

Bit 0 CRCEOC: CRC end-of-computation flag

0: Computation ongoing

1: Computation done

16.6.19 RAMCFG RETRAM CRC calculated signature register (RAMCFG_RETRAMCCSR)

Address offset: 0x1C0

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
CRCCS[31:16]
rrrrrrrrrrrrrrrr
1514131211109876543210
CRCCS[15:0]
rrrrrrrrrrrrrrrr

Bits 31:0 CRCCS[31:0]: CRC calculated signature

When CRCEOC is set in RAMCFG_RETRAMCSRSR, this bitfield is updated with the calculate signature representing the content of the SRAM buffer to compute.

16.6.20 RAMCFG BKPSRAM control register (RAMCFG_BKPSRAMCR)

Address offset: 0x380

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
ER
Res.Res.Res.ALERes.Res.Res.ECCE
rsrwrs

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMER: SRAM erase.

This bit can be set by software only after writing the unlock sequence in ERASEKEY of RAMCFG_BKPSRAMERASEKEY. Setting this bit starts the SRAM erase. This bit is automatically cleared by hardware at the end of the erase operation.

0: No erase operation ongoing

1: Erase operation ongoing

Bits 7:5 Reserved, must be kept at reset value.

Bit 4 ALE: Address latch enable

0: Failing address not stored in the BKPSRAMECC single/double error address registers

1: Failing address stored in the BKPSRAMECC single/double error address registers

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 ECCE: ECC enable

When set, this bit can be cleared by software only after writing the unlock sequence in RAMCFG_BKPSRAMECCKEYR.

0: ECC disabled

1: ECC enabled

16.6.21 RAMCFG BKPSRAM interrupt enable register (RAMCFG_BKPSRAMIER)

Address offset: 0x384

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEIESEIE
rwrw

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 DEIE: ECC double-error interrupt enable

0: Double-error interrupt disabled

1: Double-error interrupt enabled

Bit 0 SEIE: ECC single-error interrupt enable

0: Single-error interrupt disabled

1: Single-error interrupt enabled

16.6.22 RAMCFG BKPSRAM interrupt status register (RAMCFG_BKPSRAMISR)

Address offset: 0x388

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SRAM
BUSY
Res.Res.Res.Res.Res.Res.DEDSEC
rrr

Bits 31:9 Reserved, must be kept at reset value.

Bit 8 SRAMBUSY: SRAM busy with erase operation

0: No erase operation ongoing

1: Erase operation ongoing

Note: Depending on the SRAM, the erase operation can be performed due to software request, system reset if the option is not disabled by software and tamper detection. Refer to Table 67: Internal SRAM features.

Bits 7:2 Reserved, must be kept at reset value.

Bit 1 DED: ECC double error detected

0: No double error

1: Double error detected

Bit 0 SEC: ECC single error corrected

0: No single error

1: Single error detected and corrected

16.6.23 RAMCFG BKPSRAM ECC single error address register (RAMCFG_BKPSRAMEEAR)

Address offset: 0x38C

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.ESEA[10:0]
rrrrrrrrrrr

Bits 31:11 Reserved, must be kept at reset value.

Bits 10:0 ESEA[10:0]: ECC single error address

When ALE is set in RAMCFG_BKPSRAMCR, this field is updated with the word-address corresponding to the ECC single error.

16.6.24 RAMCFG BKPSRAM ECC double error address register (RAMCFG_BKPSRAMDEAR)

Address offset: 0x390

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.EDEA[10:0]
rrrrrrrrrrr

Bits 31:11 Reserved, must be kept at reset value.

Bits 10:0 EDEA[10:0]: ECC double error address

When ALE is set in RAMCFG_BKPSRAMCR, this bitfield is updated with the word-address corresponding to the ECC double error.

16.6.25 RAMCFG BKPSRAM interrupt clear flag register (RAMCFG_BKPSRAMICR)

Address offset: 0x394

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CDEDCSEC
ww

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 CDED: Clear of ECC double error detected

Writing 1 to this flag clears DED in RAMCFG_BKPSRAMISR.

Bit 0 CSEC: Clear of ECC single corrected

Writing 1 to this flag clears SEC in RAMCFG_BKPSRAMISR.

16.6.26 RAMCFG BKPSRAM ECC key register
(RAMCFG_BKPSRAMECCKEYR)

Address offset: 0x3A4

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ECCKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ECCKEY[7:0]: ECC write protection key

The following steps are required to unlock the write protection of ECCE in RAMCFG_BKPSRAMCR.

  1. Write 0xAE into ECCKEY[7:0].
  2. Write 0x75 into ECCKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.27 RAMCFG BKPSRAM erase key register
(RAMCFG_BKPSRAMERKEYR)

Address offset: 0x3A8

Reset value: 0x0000 0000

Reset on any system reset.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 ERASEKEY[7:0]: Erase write protection key

The following steps are required to unlock the write protection of SRAMER in RAMCFG_BKPSRAMCR.

  1. Write 0xCA into ERASEKEY[7:0].
  2. Write 0x53 into ERASEKEY[7:0].

Note: Writing a wrong key reactivates the write protection.

16.6.28 RAMCFG register map

Table 71. RAMCFG register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x000RAMCFG_SYSRAMCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMERRes.Res.Res.Res.Res.Res.Res.
Reset value0
0x004ReservedReserved
0x008RAMCFG_SYSRAMISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMBUSYRes.Res.Res.Res.Res.Res.Res.
Reset value0
0x00C-0x024ReservedReserved
0x028RAMCFG_SYSRAMERKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
Reset value00000000
0x02C-0x07CReservedReserved
0x080RAMCFG_SRAM1CRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMERRes.Res.Res.Res.Res.Res.Res.
Reset value0
0x084ReservedReserved
0x088RAMCFG_SRAM1ISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMBUSYRes.Res.Res.Res.Res.Res.Res.
Reset value0
0x08C-0x0A4ReservedReserved
0x0A8RAMCFG_SRAM1ERKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
Reset value00000000
0x0AC-0x17CReservedReserved
0x180RAMCFG_RETRAMCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMERRes.Res.Res.Res.ALERes.ECCE
Reset value000
0x184RAMCFG_RETRAMIERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEIESEIE
Reset value000
0x188RAMCFG_RETRAMISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMBUSYRes.Res.Res.Res.Res.DEDSEC
Reset value000

Table 71. RAMCFG register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x18CRAMCFG_RETRAMSEARRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ESEA[14:0]
Reset value000000000000000
0x190RAMCFG_RETRAMDEARRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EDEA[14:0]
Reset value000000000000000
0x194RAMCFG_RETRAMICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CDEDCSEC
Reset value00
0x198-0x1A0ReservedReserved
0x1A4RAMCFG_RETRAMECCKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ECCKEY[7:0]
Reset value00000000
0x1A8RAMCFG_RETRAMERKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
Reset value00000000
0x1ACReservedReserved
0x1B0RAMCFG_RETRAMCCR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCBS [2:0]Res.Res.CRCC [1:0]
Reset value11100
0x1B4RAMCFG_RETRAMCCR2CRCFCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCCS
Reset value00
0x1B8RAMCFG_RETRAMCRSRCRCRS[31:0]
Reset value0000000000000000000000000000000
0x1BCRAMCFG_RETRAMCSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRSCSCRCEOC
Reset value00
0x1C0RAMCFG_RETRAMCCSRCRCCS[31:0]
Reset value0000000000000000000000000000000
0x1C4-0x37CReservedReserved
0x380RAMCFG_BKPSRAMCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMERRes.Res.Res.ALERes.Res.ECCE
Reset value000
0x384RAMCFG_BKPSRAMIERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEIESEIEECCE
Reset value000

Table 71. RAMCFG register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x388RAMCFG_BKPSRAMISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SRAMBUSYRes.Res.Res.Res.Res.Res.DEDSEC
Reset value000
0x38CRAMCFG_BKPSRAMEEARRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ESEA[10:0]
Reset value00000000000
0x390RAMCFG_BKPSRAMDEARRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EDEA[10:0]
Reset value00000000000
0x394RAMCFG_BKPSRAMICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CDEDCSEC
Reset value00
0x398-0x3A0ReservedReserved
0x3A4RAMCFG_BKPSRAMECCKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ECCKEY[7:0]
Reset value000000000
0x3A8RAMCFG_BKPSRAMERKEYRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ERASEKEY[7:0]
Reset value000000000
0x3AC-0x4FCReservedReserved

Refer to Section 2.4 for the register boundary addresses.