Skip to main content
arnold_w
Senior II
December 20, 2021
Question

What is the reason for have two SRAM in the STM32L476 microcontroller?

  • December 20, 2021
  • 4 replies
  • 1186 views

I'm learning about the STM32L476 microcontroller and saw that it has two SRAM memories. What is the reason for that? I also see that it's possible to enable parity check on SRAM2. How come, is SRAM2 unreliable?

This topic has been closed for replies.

4 replies

TDK
December 20, 2021

No memory is 100% reliable. Having a parity bit allows for the detection of errors if only a single bit is flipped. Some applications have requirements for redundancy or error checking due to safety and the addition of a parity bit can satisfy those requirements.

https://en.wikipedia.org/wiki/Single-event_upset

"If you feel a post has answered your question, please click ""Accept as Solution""."
KBuch
Associate
December 20, 2021

The datasheet is your friend.

SRAM2 is a 32kByte memory area which can retain its content even if you send the processor into standby mode (with extremly low power consumption).

When powering up you want to make sure that the memory has not changed to to unforseen external reasons.

KnarfB
Super User
December 20, 2021

Just another aspect: You may put some code to SRAM2 and execute it with "with maximum performance ... thanks to access through ICode bus." (Ref.Manual) Looking at the bus matrix and memory mapping you will see data in SRAM1 is accessed via SBus and both can be done in parallel.

hth

KnarfB

Uwe Bonnes
Chief
December 20, 2021

Seperate RAM regions allow concurrent RAM access, e.g. by DMA and the CPU