6. RAMs configuration controller (RAMCFG)
6.1 RAMCFG introduction
The RAMCFG configures the features of the internal SRAMs (SRAM1, SRAM2, SRAM3, SRAM4, SRAM5, and BKPSRAM).
6.2 RAMCFG main features
The internal SRAMs support some of the features listed hereafter, configured in RAMCFG:
- • Error code correction (ECC):
- – Single error detection and correction with interrupt generation
- – Double error detection with interrupt or NMI generation
- – Status with failing address
- • Write protection (1-Kbyte granularity)
- • SRAM software erase
6.3 RAMCFG functional description
6.3.1 Internal SRAM features
Six SRAMs are embedded in the devices, each with specific features (see Table 34):
- • SRAM1/2/3/4/5 are the main SRAMs, made of several blocks that can be powered down in Stop mode to reduce consumption:
- – SRAM1: four 64-Kbyte blocks (total 256 Kbytes)
- – SRAM2: 16-Kbyte + 48-Kbyte + 16-Kbyte + 48-Kbyte blocks (total 128 Kbytes)
- – SRAM3: six 64-Kbyte blocks (total 384 Kbytes)
- – SRAM4: six 64-Kbyte blocks (total 384 Kbytes)
- – SRAM5: six 64-Kbyte blocks (total 384 Kbytes)
The backup SRAM (BKPSRAM) can be retained in all low-power modes and when \(V_{DD}\) is off in VBAT mode. Refer to Section 10: Power control (PWR) for more details.
- • SRAM2 is erased when a system reset occurs, if the SRAM2_RST option bit is selected in the flash memory user option bytes. SRAM1, SRAM3, and SRAM4/5 are erased when a system reset occurs if the SRAM1345_RST option bit is selected in the flash memory user option bytes. Refer to Section 7: Embedded flash memory (FLASH) for more details.
- • SRAM2 and optionally BKPSRAM are protected by the tamper detection circuit, and are erased by hardware in case of tamper detection. Refer to Section 58: Tamper and backup registers (TAMP) for more details.
- • The RAMCFG embeds the registers related to the internal SRAMs ECC, write protection, and software erase.
Table 34. Features of internal SRAMs
| Feature | SRAM1 | SRAM2 | SRAM3 | SRAM4 | SRAM5 | BKPSRAM |
|---|---|---|---|---|---|---|
| Total size (Kbytes) | 256 (4 x 64) | 128 (16 + 48 + 16 + 48) | 384 (6 x 64) | 4 | ||
| Optional retention in Standby mode | - | - | - | - | - | X |
| Optional retention in Stop mode | X | X | X | X | X | X |
| Optional retention in VBAT mode | - | - | - | - | - | X |
| Erased with tamper detection | - | X | - | - | - | X |
| Erased with backup domain reset | - | - | - | - | - | X |
| Erased with product state regression | X | X | X | X | X | X |
| Optionally erased with system reset | X | X | X | X | X | - |
| Software erase | X | X | X | X | X | X |
| ECC | - | X | X | - | - | X |
| Write protection | - | X | - | - | - | X(1) |
- 1. BKPSRAM write protection can be enabled/disabled by using disable backup domain write protection (DBP) bit in the Backup domain.
6.3.2 Error code correction (SRAM2, SRAM3, BKPSRAM)
The ECC is supported by SRAM2, SRAM3, and BKPSRAM when enabled with the SRAM2_ECC, SRAM3_ECC, and BKPSRAM_ECC user option bits. Refer to Section 7: Embedded flash memory (FLASH) for more details.
Seven ECC bits are added per 32 bits of SRAM, allowing two bits error detection and one bit error correction on memory read access.
The ECC is calculated and checked for a 32-bit word. Byte and half-word write accesses are managed by the SRAM interface by first reading the whole word, then writing it again with the new byte/half-word value. ECC double errors are also detected during these 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. SEDC and CSEDC bits are set, respectively, in the RAMCFG memory interrupt status register (RAMCFG_MxISR) and RAMCFG memory x interrupt clear register x (RAMCFG_MxICR). The associated ECC single error address is updated only if the single error interrupt is enabled (SEIE bit of RAMCFG memory x interrupt enable register (RAMCFG_MxIER) is set). An interrupt is generated if enabled by the SEIE bit. The failing address is stored in the RAMCFG memory x ECC single error address register (RAMCFG_MxSEAR) if the ALE bit is set in the RAMCFG memory x control register (RAMCFG_MxCR).
Caution: Single errors cannot be detected when the SEDC bit is set.
When a double error is detected, the DED and CDDED bits are set in the RAMCFG memory interrupt status register (RAMCFG_MxISR) and RAMCFG memory x interrupt clear register x (RAMCFG_MxICR), respectively. The associated ECC double error address is updated only if double error interrupt or NMI is enabled (DEIE bit or ECCNMI bit of RAMCFG_MxIER is set). An interrupt or NMI is generated if enabled by the DEIE or ECCNMI bit in the RAMCFG memory x interrupt enable register (RAMCFG_MxIER). The failing address is stored in the RAMCFG memory x ECC double error address register (RAMCFG_MxDEAR) if the ALE bit is set in the RAMCFG memory x control register (RAMCFG_MxCR).
Caution: Double errors cannot be detected when the DED bit is set.
SRAM3 ECC specific management
When the ECC is enabled for SRAM3, only the first 256 Kbytes of SRAM3 are with ECC. The next 64 Kbytes are without ECC, and the last block is used to store the ECC, hence it cannot be used by the application.
Figure 19 shows the SRAM areas, when SRAM2 and SRAM3 ECC are enabled.
Figure 19. Memory map: SRAM2/3

| Address offset | |||
|---|---|---|---|
| SRAM3 | 0xB FFFF 0xB 0000 0xA FFFF 0xA 0000 0x9 FFFF | 64 Kbytes | Reserved (ECC storage) |
| 64 Kbytes | SRAM with no ECC | ||
| 64 Kbytes | |||
| 64 Kbytes | |||
| SRAM2 | 0x6 0000 0x5 FFFF | 48 Kbytes high | SRAM with ECC |
| 16 Kbytes high | |||
| 48 Kbytes low | |||
| 0x4 0000 | 16 Kbytes low | ||
MS56558V1
When ECC is enabled by user option bits, the ECCE bit is automatically set after a system reset in the related RAMCFG memory x control register (RAMCFG_MxCR).
The ECC can be deactivated by executing the following software sequence:
- 1. Write 0xAE in the RAMCFG memory x ECC key register (RAMCFG_MxECCKEYR).
- 2. Write 0x75 in the RAMCFG memory x ECC key register (RAMCFG_MxECCKEYR).
- 3. Write 0 in the ECCE bit of the RAMCFG memory x control register (RAMCFG_MxCR).
When ECC is deactivated (ECCE = 0), the SRAM3 ECC storage area can be read and written for ECC user test purpose. When the ECC is activated (ECCE = 1), this area is reserved for ECC storage purpose, and cannot be neither read, nor written.
The procedure to check ECC on SRAM3 is the following:
- 1. On an erased memory, write data with ECC on.
- 2. Disable ECC.
- 3. Write the same data with 1- or 2-bit modification, respectively, for single or double error test.
- 4. Enable ECC.
- 5. Wait until ECCE bit of RAMCFG_M3CR is read at 1.
- 6. Read data. Enabled interrupt is generated because of single or double error.
- 7. Instructions for steps 3 and 4 must not be located in SRAM3 with ECC area. Any access to SRAM3 with ECC area by the other masters is forbidden during the execution of steps 4 and 5, until they are completed.
Warning: The ECC fault injection test triggers a system break event in TIM1/8/15/16/17 if the SEL bit is set in SBS_CFGR2. As a consequence, the test must be performed while the PWM outputs of the timers are in idle state.
6.3.3 Write protection (SRAM2)
The SRAM2 is made of 1-Kbyte pages, each of them can be write-protected by setting its corresponding PxWP bit in RAMCFG memory 2 write protection register 1 (RAMCFG_M2WPR1), RAMCFG memory 2 write protection register 2 (RAMCFG_M2WPR2), RAMCFG memory 2 write protection register 3 (RAMCFG_M2WPR3), and RAMCFG memory 2 write protection register 4 (RAMCFG_M2WPR4).
Table 35. SRAM2 features
| Page size | Number of pages | PxWP bits |
|---|---|---|
| 1 Kbytes | 128 | 0 to 127 |
6.3.4 Software erase
SRAM erase can be requested by executing this software sequence:
- 1. Write 0xCA in the RAMCFG memory x erase key register (RAMCFG_MxERKEYR).
- 2. Write 0x53 in the RAMCFG memory x erase key register (RAMCFG_MxERKEYR).
- 3. Write 1 in the SRAMER bit of the RAMCFG memory x control register (RAMCFG_MxCR).
SRAMBUSY flag is set in the related SRAM interrupt status register as long as the erase is ongoing. The total duration of each SRAM erase is N AHB clock cycles, where N is the size of the SRAM in 32-bit words. If the SRAM is read or written while an erase is ongoing, wait states are inserted on the AHB bus until the end of the operation.
6.4 RAMCFG low-power modes
Table 36. Effect of low-power modes on RAMCFG
| Mode | Description |
|---|---|
| Sleep | No effect. RAMCFG interrupts cause the device to exit Sleep mode. |
| Stop | The content of RAMCFG registers is kept. |
| Standby | The RAMCFG is powered down, and must be reinitialized after exiting Standby mode. |
6.5 RAMCFG interrupts
Table 37. RAMCFG interrupt requests
| Interrupt acronym | Interrupt event | Event flag | Enable control bit(s) | Interrupt clear method | Exit Sleep mode | Exit Stop mode | Exit Standby mode |
|---|---|---|---|---|---|---|---|
| RAMCFG | ECC single error detection and correction | SEDC | SEIE | Write 1 in CSEDC | Yes | No | No |
| ECC double error detection | DED | DEIE = 1 and ECCNMI = 0 | Write 1 in CDED | Yes | No | No | |
| NMI | ECC double error detection | DED | ECCNMI | Write 1 in CDED | Yes | No | No |
6.6 RAMCFG registers
In the registers description, x refers to:
- SRAM1/2/3 when x = 1/2/3, respectively
- BKPSRAM when x = 5
- SRAM4 when x = 6
- SRAM5 when x = 7
6.6.1 RAMCFG memory x control register (RAMCFG_MxCR)
Address offset: 0x000+0x040*(x-1), (x = 1, 2, 3, 5, 6, 7)
Reset value: 0x0000 000X
ECCE reset value depends on ECC enable user option bit.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | SRAM ER | Res. | Res. | Res. | ALE | Res. | Res. | Res. | ECCE |
| rs | rw | 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 the ERASEKEY field of the RAMCFG_MxERKEYR register. 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 SRAMx ECC single/double error address registers
- 1: Failing address stored in the SRAMx ECC single/double error address registers
Note: For SRAM1/4/5, this bit is reserved and must be kept at reset value.
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 ECCE: ECC enable.
This bit reset value is defined by the user option bit configuration. When set, it can be cleared by software only after writing the unlock sequence in the RAMCFG_MxECCKEYR register.
- 0: ECC disabled
- 1: ECC enabled
Note: For SRAM1/4/5, this bit is reserved and must be kept at reset value.
6.6.2 RAMCFG memory x interrupt enable register (RAMCFG_MxIER)
Address offset: 0x004+0x040*(x-1), (x = 2,3,5)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ECCNMI | Res. | DEIE | SEIE |
| rs | rw | rw |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 ECCNMI: Double error NMI
This bit is set by software and cleared only by a global RAMCFG reset.
- 0: NMI not generated in case of ECC double error
- 1: NMI generated in case of ECC double error
Note: if ECCNMI is set, the RAMCFG maskable interrupt is not generated, whatever DEIE bit value.
Bit 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
6.6.3 RAMCFG memory interrupt status register (RAMCFG_MxISR)
Address offset: 0x008+0x040*(x-1), (x = 1,2,3,5,6,7)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | SRAM BUSY | Res. | Res. | Res. | Res. | Res. | Res. | DED | SEDC |
| r | r | 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 started by a software request, by a system reset if the option bit is enabled, by tamper detection, or by readout protection regression. Refer to Table 34.
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
Note: For SRAM1/4/5, this bit is reserved and must be kept at reset value.
Bit 0 SEDC: ECC single error detected and corrected
0: No single error
1: Single error detected and corrected
Note: For SRAM1/4/5, this bit is reserved and must be kept at reset value.
6.6.4 RAMCFG memory x ECC single error address register (RAMCFG_MxSEAR)
Address offset: 0x00C+0x040*(x-1), (x = 2,3)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| ESEA[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ESEA[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 ESEA[31:0]: ECC single error address
When the ALE bit is set in the RAMCFG_MxCR register, this bitfield is updated with the address corresponding to the ECC single error.
6.6.5 RAMCFG memory x ECC double error address register (RAMCFG_MxDEAR)
Address offset: 0x010+0x040*(x-1), (x = 2,3,5)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| EDEA[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| EDEA[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 EDEA[31:0]: ECC double error address
When the ALE bit is set in the RAMCFG_MxCR register, this bitfield is updated with the address corresponding to the ECC double error.
6.6.6 RAMCFG memory x interrupt clear register x (RAMCFG_MxICR)
Address offset: 0x014+0x040*(x-1), (x = 2,3,5)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CDED | CSEDC |
| rw | rw |
Bits 31:2 Reserved, must be kept at reset value.
Bit 1 CDED: Clear ECC double error detected
Writing 1 to this flag clears the DED bit in the RAMCFG_MxISR register. Reading this flag returns the DED value.
Bit 0 CSEDC: Clear ECC single error detected and corrected
Writing 1 to this flag clears the SEDC bit in the RAMCFG_MxISR register. Reading this flag returns the SEDC value.
6.6.7 RAMCFG memory 2 write protection register 1
(RAMCFG_M2WPR1)
Address offset: 0x058
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P31WP | P30WP | P29WP | P28WP | P27WP | P26WP | P25WP | P24WP | P23WP | P22WP | P21WP | P20WP | P19WP | P18WP | P17WP | P16WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| P15WP | P14WP | P13WP | P12WP | P11WP | P10WP | P9WP | P8WP | P7WP | P6WP | P5WP | P4WP | P3WP | P2WP | P1WP | P0WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
Bits 31:0 PyWP: SRAM2 1-Kbyte page y write protection (y = 31 to 0)
These bits are set by software and cleared only by a global RAMCFG reset.
0: Write protection of SRAM2 1-Kbyte page y is disabled.
1: Write protection of SRAM2 1-Kbyte page y is enabled.
6.6.8 RAMCFG memory 2 write protection register 2
(RAMCFG_M2WPR2)
Address offset: 0x05C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P63WP | P62WP | P61WP | P60WP | P59WP | P58WP | P57WP | P56WP | P55WP | P54WP | P53WP | P52WP | P51WP | P50WP | P49WP | P48WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| P47WP | P46WP | P45WP | P44WP | P43WP | P42WP | P41WP | P40WP | P39WP | P38WP | P37WP | P36WP | P35WP | P34WP | P33WP | P32WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
Bits 31:0 PyWP: SRAM2 1-Kbyte page y write protection (y = 63 to 32)
These bits are set by software and cleared only by a global RAMCFG reset.
0: Write protection of SRAM2 1-Kbyte page y is disabled.
1: Write protection of SRAM2 1-Kbyte page y is enabled.
6.6.9 RAMCFG memory x ECC key register
(RAMCFG_MxECCKEYR)
Address offset: 0x024 + 0x040 * (x - 1), (x = 2, 3, 5)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ECCKEY[7:0] | |||||||
| w | w | w | w | w | w | w | w | ||||||||
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 the ECCE bit in the RAMCFG_MxCR register.
1) Write 0xAE into ECCKEY[7:0].
2) Write 0x75 into ECCKEY[7:0].
Note: Writing a wrong key reactivates the write protection.
6.6.10 RAMCFG memory x erase key register (RAMCFG_MxERKEYR)
Address offset: 0x028 + 0x040 * (x - 1), (x = 1, 2, 3, 5, 6, 7)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ERASEKEY[7:0] | |||||||
| w | w | w | w | w | w | w | w | ||||||||
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 the SRAMER bit in the RAMCFG_MxCR register.
1) Write 0xCA into ERASEKEY[7:0].
2) Write 0x53 into ERASEKEY[7:0].
Note: Writing a wrong key reactivates the write protection.
6.6.11 RAMCFG memory 2 write protection register 3 (RAMCFG_M2WPR3)
Address offset: 0x070
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| P95WP | P94WP | P93WP | P92WP | P91WP | P90WP | P89WP | P88WP | P87WP | P86WP | P85WP | P84WP | P83WP | P82WP | P81WP | P80WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| P79WP | P78WP | P77WP | P76WP | P75WP | P74WP | P73WP | P72WP | P71WP | P70WP | P69WP | P68WP | P67WP | P66WP | P65WP | P64WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
Bits 31:0 PyWP: SRAM2 1-Kbyte page y write protection (y = 95 to 64)
These bits are set by software and cleared only by a global RAMCFG reset.
0: Write protection of SRAM2 1-Kbyte page y is disabled.
1: Write protection of SRAM2 1-Kbyte page y is enabled.
6.6.12 RAMCFG memory 2 write protection register 4 (RAMCFG_M2WPR4)
Address offset: 0x074
Reset value: 0x0000 0000
| RM0517 6.6.12 | column_2 | column_3 | column_4 | column_5 | column_6 | column_7 | column_8 | column_9 | column_10 | column_11 | column_12 | column_13 | column_14 | column_15 | column_16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| P127 | P126 | P125 | P124 | P123 | P122 | P121 | P120 | P119 | P118 | P117 | P116 | P115 | P114 | P113 | P112 |
| WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| P111 | P110 | P109 | P108 | P107 | P106 | P105 | P104 | P103 | P102 | P101 | P100 | P99 | P98 | P97 | P96 |
| WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP | WP |
| rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs | rs |
| Bits 31:0 | PyWP : SRAM2 1-Kbyte page y write protection (y = 127 to 96) | ||||||||||||||
| RM0517 Rev 1 | 275/ | 3945 |
Bits 31:0 PyWP: SRAM2 1-Kbyte page y write protection (y = 127 to 96)
These bits are set by software and cleared only by a global RAMCFG reset.
0: Write protection of SRAM2 1-Kbyte page y is disabled.
1: Write protection of SRAM2 1-Kbyte page y is enabled.
6.6.13 RAMCFG register map
Table 38. RAMCFG register map and reset values
| 6.6.13 | column_2 | column_3 | column_4 | column_5 | column_6 | column_7 | column_8 | column_9 | RM0517 |
|---|---|---|---|---|---|---|---|---|---|
| Offset | Register name | 31 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 21 2 0 19 18 17 16 15 14 | 13 | 12 | 1 1 | 10 | 9 | 8 | 7 6 5 4 3 2 1 0 |
| S R A M E R | |||||||||
| C C E E | |||||||||
| 0x000 + 0x040 * (x-1) (x=1,2,3,5,6,7) | RAMCFG_MxCR | R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. R e s. R e s. AL E R e s. R e s. R e s. | |
| Reset value | 0 | 0 x | |||||||
| E C C N MI D EIE S EIE | |||||||||
| 0x004 + 0x040 * (x-1) (x=2,3,5) | RAMCFG_MxIER | R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. R e s. R e s. R e s. R e s. |
| Reset value | 0 00 | ||||||||
| S S R A M B U Y | |||||||||
| D E D | |||||||||
| 0x008 + | RAMCFG_MxISR | S C E D | |||||||
| 0x040 * (x-1) (x=1,2,3,5,6,7) | R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. R e s. R e s. R e s. R e s. R e s. | ||
| Reset value | 0 | 00 | |||||||
| 0x00C + 0x040 * (x-1) | RAMCFG_MxSEAR | ESEA[31:0] | |||||||
| (x=2,3) | Reset value | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | |||||||
| 0x010 + 0x040 * (x-1) | RAMCFG_MxDEAR | EDEA[31:0] | |||||||
| (x=2,3,5) | Reset value | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | |||||||
| C S C E D | |||||||||
| R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. R e s. R e s. R e s. R e s. R e s. | ||
| 0x014 + 0x040 * (x-1) | RAMCFG_MxICR | C D E D | |||||||
| (x=2,3,5) | Reset value Reset value | 00 | |||||||
| P 3 0WP | |||||||||
| 2 9WP P | |||||||||
| P 2 8WP | |||||||||
| 2 P 7WP | |||||||||
| P 2 6WP | |||||||||
| 2 P 5WP | |||||||||
| P 2 4WP | |||||||||
| 2 3WP P | |||||||||
| P 2 2WP | |||||||||
| P 2 0WP P 31WP 21WP P P19WP P18WP P17WP P16WP P15WP P14WP | P13WP | P12WP | P1 1WP | P10WP | P 9WP | P 8WP | P 7WP P 6WP P 5WP P 4WP P 3WP 2WP P P1WP 0WP P | ||
| 0x058 0x058 | RAMCFG_M2WPR1 RAMCFG_M2WPR1 | ||||||||
| Reset value | P 6 3WP | ||||||||
| P 6 2WP | |||||||||
| P 6 0WP | |||||||||
| 9WP P 5 | |||||||||
| P 8WP 5 | |||||||||
| P 5 7WP | |||||||||
| P 5 6WP | |||||||||
| P 5 5WP | |||||||||
| P 5 4WP | |||||||||
| 3WP P 5 | |||||||||
| P 5 2WP | |||||||||
| P 5 0WP | |||||||||
| P 4 9WP | |||||||||
| P 4 8WP | |||||||||
| P 4 7WP | |||||||||
| P 4 6WP | |||||||||
| P 4 5WP | |||||||||
| P 4 4WP | |||||||||
| P 4 3WP | |||||||||
| P 4 2WP | |||||||||
| P 4 0WP | |||||||||
| P 3 9WP | |||||||||
| P 3 8WP | |||||||||
| P 3 7WP | |||||||||
| 3 6WP P | |||||||||
| P 3 5WP | |||||||||
| 3 P 4WP | |||||||||
| P 3 3WP | |||||||||
| 61WP P P 51WP | P 41WP | 3 2WP P | |||||||
| 0x05C 0x05C | RAMCFG_M2WPR2 RAMCFG_M2WPR2 | ||||||||
| 0x024 + 0x040 * (x-1) | Reset value RAMCFG _MxECCKEYR | R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | ECCKEY[7:0] |
| (x=2,3,5) | Reset value | 00000000 | |||||||
| 0x028 + | RAMCFG | R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | R e s. | ERASEKEY[7:0] |
| 0x040 * (x-1) 0x040 * (x-1) | _MxERKEYR _MxERKEYR | ||||||||
| (x=1,2,3,5,6,7) | Reset value | 00000000 | |||||||
| P 9 5WP | |||||||||
| P 9 4WP | |||||||||
| 9 3WP P | |||||||||
| P 9 2WP | |||||||||
| P 9 0WP | |||||||||
| 8 9WP P | |||||||||
| P 8 8WP | |||||||||
| 8 P 7WP | |||||||||
| P 8 6WP | |||||||||
| 8 P 5WP | |||||||||
| P 8 4WP | |||||||||
| P 8 3WP | |||||||||
| P 8 2WP | |||||||||
| P 8 0WP | |||||||||
| P 9WP 7 | |||||||||
| P 8WP 7 | |||||||||
| P 7WP 7 | |||||||||
| P 6WP 7 | |||||||||
| P 5WP 7 | |||||||||
| P 4WP 7 | |||||||||
| P 3WP 7 | |||||||||
| P 2WP 7 | |||||||||
| P 0WP 7 | |||||||||
| P 6 9WP | |||||||||
| 6 8WP P | |||||||||
| P 6 7WP | |||||||||
| 6 6WP P | |||||||||
| P 6 5WP | |||||||||
| 91WP P P 81WP | 6 P 4WP P 71WP | ||||||||
| 0x070 0x070 | RAMCFG_M2WPR3 RAMCFG_M2WPR3 | P12 7WP P12 6WP P12 5WP P12 4WP P12 3WP P12 2WP P121WP P12 0WP P1 19WP P1 18WP P1 17WP P1 16WP P1 15WP P1 14WP P1 13WP P1 12WP P1 10WP | P10 9WP | P10 8WP | P10 7WP | P10 6WP | P10 5WP | P10 4WP | P10 3WP P10 2WP P101WP P10 0WP |
| Reset value | P1 1 1WP | ||||||||
| P 9 9WP | |||||||||
| 9 8WP P | |||||||||
| P 9 7WP | |||||||||
| 9 6WP P | |||||||||
| 0x074 0x074 | RAMCFG_M2WPR4 RAMCFG_M2WPR4 | ||||||||
| Refer to Section 2.3 | for the register boundary addresses. |