22.5.4.3 SRAM Power Switch Configuration

The SRAM is divided in sub-blocks which can be switched OFF to optimize power consumption.

By default, all sub-blocks are switched ON but it is possible to switch them OFF (excluding the first 16 kB sub-block which remains always powered) depending on the SRAM memory size use.

This behavior can be changed by configuring RAMPSWC bit field in the Power Configuration register (PWCFG).

CAUTION: This configuration takes effect immediately. So, this is the responsibility of the user to ensure that no access is performed on a SRAM sub-block which is switched OFF.

When a SRAM sub-block is switched from OFF to ON state, 1us delay is required before re-accessing it.

The first sub-block to be switched OFF is always at the top of the SRAM block memory and the same behavior applies for the next switched OFF sub-blocks.