Showing results for 
Search instead for 
Did you mean: 

Low Power Mode StandBy at STM32L562 - SRAM2 Data retention cannot be disabled

Associate III

Hello Community,

I am programming the STM32L562E-DK discovery board and working with the Standby low-power mode. In the data sheet there are 3 standby variations explained:

  • Standby with Full SRAM2 data retention
  • Standby with 4kB SRAM2 data retention
  • Standby without any data retention (all SRAM1 and SRAM2 is lost)

I cannot reach the variations, where part of the SRAM2 or all SRAM2 data retention should be disabled.

Always after I wake up the processor from the standby mode the data in SRAM2 is still there. SRAM1 is lost (which is correct).

I have tried everything to activate the Standby mode without any data retention, but it doesnt work.

To put the processor in standby mode I use the following code:

if (__HAL_PWR_GET_FLAG(PWR_FLAG_WUF2) != RESET)/* Check and Clear the Wakeup flag */

I checked every important register, especially the PWR->CR3->RRS bits which determine SRAM2 data retention.

My code is pretty much based on the official standby mode example at .

I don't know if I am missing an instruction or if there exists a hardware bug which leads to the disability to disable SRAM2.

If anyone can help I would very much appreciate it.

Thanks in advance.


Please check L5x2 errata stheet :

There is one item talking about SRAM2 and standby, but I didn't check if it matches your case.

Associate III

Thank you for your answere Mike.

I have checked the errata sheet but sadly this is not the case.

It says :

Since I am directly transitioning from run mode to standby "with" modes, I don think this errata is valid for my case.

I am still looking for a solution.

Associate II

I have seen this too. Ie, SRAM2 data being retained when the RRS bits are clear. i read them back to check. What bought me here is the converse,  and for me, a very serious problem. The RRS bits are set for 4 k SRAM2 retention, and after a period of weeks or months, the product is acting as though SRAM2 data retention through standby has failed, SRAM2 being filled with pseudo random garbage on wake from standby.