274. In 'L4, SRAM2 in some respects behaves as backup SRAM
SRAM in the 'L4 family is partitioned into several portions. SRAM2 is a part of SRAM, up to 64kB, which has several quite interesting properties other parts of SRAM do not possess:
- it is mapped into the 0x1000xxxx area, making it core-coupled i.e. accessed from I- and D- ports of the processor, consequently code runs out of it faster
- it is write-protectable with 1kB granularity (see SYSCFG_SWPR register)
- it has an optional hardware parity check (can be switched on using SRAM2_PE in option bytes)
- it can be erased upon system reset, using SRAM2_RST in option bytes
- it can be erased also from the program, using SYSCFG.SCSR.SRAM2ER bit
- it can retain its content in Standby mode (see PWR_CR3.RRS)
- in RDP Level 1 its content cannot be read using debugger (or when boots from RAM)
- when RDP changes from Level 1 to Level 0, it is bulk-erased together with FLASH
While it is not a true backup-SRAM as found in 'F2/'F4/'F7/'H7, thus won't preserve content in Shutdown and VBAT modes, in many respects (capable of retaining data in Standby mode, RDP-protected and erased when RDP level decreases) it is similar to backup-SRAM, and keeping the differences in mind, it can fulfill some of its roles.
See also g205.