RM0365
55/1080
DocID025202 Rev 7
3.3 Embedded
SRAM
STM32F302xB/C devices feature up to 40 Kbytes of static SRAM. It can be accessed as
bytes, halfwords (16 bits) or full words (32 bits). It can be addressed at maximum system
clock frequency without wait states and can be accessed by both CPU and DMA.
STM32F302x6/8 devices feature only up to 16 Kbytes of static SRAM.
STM32F302xD/E devices feature up to 64 Kbytes of static SRAM.
3.3.1 Parity
check
On the STM32F302xD/E devices, for the 40-Kbyte SRAM, a parity check is implemented
only on the first 16 Kbytes.
On the STM32F302xD/E devices, the parity check is implemented on the first 32 Kbytes of
SRAM. On the STM32F302x6/x8 the SRAM parity check is not supported.The SRAM parity
check is disabled by default. It is enabled by the user, when needed, using an option bit.
The data bus width of the SRAM supporting the parity check is 36 bits because 4 bits are
available for parity check (1 bit per byte) in order to increase memory robustness, as
required for instance by Class B or SIL norms.
The parity bits are computed on data and address and stored when writing into the SRAM.
Then, they are automatically checked when reading. If one bit fails, an NMI is generated if
the SRAM parity check is enabled. The same error can also be linked to the Break input of
TIMER 1, 15, 16 and 17, by setting the SRAM_PARITY_LOCK control bit in the
SYSCFG
configuration register 2 (SYSCFG_CFGR2)
. In case of parity error, the SRAM Parity Error
flag (SRAM_PEF) is set in the
SYSCFG configuration register 2 (SYSCFG_CFGR2)
. For
more details, please refer to the
SYSCFG configuration register 2 (SYSCFG_CFGR2)
.
The BYP_ADD_PAR bit in SYSCFG_CFGR2 register can be used to prevent an unwanted
parity error to occur when the user programs a code in the RAM at address 0x2XXXXXXX
(address in the address range 0x20000000-0x20002000) and then executes the code from
RAM at boot (RAM is remapped at address 0x00).
3.4
Flash memory overview
The Flash memory is composed of two distinct physical areas:
•
The main Flash memory block. It contains the application program and user data if
necessary.
•
The information block. It is composed of two parts:
–
Option bytes for hardware and memory protection user configuration.
–
System memory which contains the proprietary boot loader code. Please, refer to
Section 4: Embedded Flash memory
for more details
.
Flash memory instructions and data access are performed through the AHB bus. The
prefetch block is used for instruction fetches through the ICode bus. Arbitration is performed
in the Flash memory interface, and priority is given to data access on the DCode bus. It also
implements the logic necessary to carry out the Flash memory operations (Program/Erase)
controlled through the Flash registers.