Skip to content

Commit e650470

Browse files
committed
STM32L4+ : SRAM3 is powered off in Stop 2 mode
By default, SRAM3 content is then lost.
1 parent 54f0f56 commit e650470

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

targets/TARGET_STM/sleep.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ __WEAK void hal_deepsleep(void)
192192
HAL_PWREx_DisableLowPowerRunMode();
193193
}
194194

195+
#if defined(PWR_CR1_RRSTP)
196+
HAL_PWREx_EnableSRAM3ContentRetention();
197+
#endif
198+
195199
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
196200

197201
if (lowPowerModeEnabled) {

targets/targets.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,11 +3287,7 @@
32873287
"device_has_add": [
32883288
"USBDEVICE"
32893289
],
3290-
"device_name": "STM32L4R5ZI",
3291-
"mbed_rom_start": "0x08000000",
3292-
"mbed_rom_size": "0x200000",
3293-
"mbed_ram_start": "0x20000000",
3294-
"mbed_ram_size": "0x40000"
3290+
"device_name": "STM32L4R5ZITx"
32953291
},
32963292
"NUCLEO_L4R5ZI_P": {
32973293
"inherits": [
@@ -3305,6 +3301,7 @@
33053301
"inherits": [
33063302
"MCU_STM32L4"
33073303
],
3304+
"device_name": "STM32L4R9AIIx",
33083305
"supported_form_factors": [
33093306
"ARDUINO",
33103307
"STMOD",
@@ -3327,11 +3324,7 @@
33273324
"device_has_add": [
33283325
"QSPI",
33293326
"USBDEVICE"
3330-
],
3331-
"mbed_rom_start": "0x08000000",
3332-
"mbed_rom_size": "0x200000",
3333-
"mbed_ram_start": "0x20000000",
3334-
"mbed_ram_size": "0x40000"
3327+
]
33353328
},
33363329
"MCU_STM32L5": {
33373330
"inherits": [

0 commit comments

Comments
 (0)