[riot-notifications] [RIOT-OS/RIOT] cpu/stm32: make backup SRAM available (#16870)

fabian18 notifications at github.com
Mon Sep 20 10:14:28 CEST 2021

@fabian18 commented on this pull request.

> +void backup_ram_init(void);
+ * @brief   Check whether the backup RAM regulator is on and backup RAM
+ *          content is retained while asleep
+ */
+bool backup_ram_is_retained(void);
+ * @brief   Enable the backup RAM regulator to retain it´s content
+ *          during standby mode
+ */
+void backup_ram_sleep(void);
+ * @brief   Disable the backup RAM regulator

>From the F7 datasheet chapter 4.1.3:
When the backup domain is supplied by VDD (analog switch connected to VDD), the backup 
SRAM is powered from VDD which replaces the VBAT power supply to save battery life.
When the backup domain is supplied by VBAT (analog switch connected to VBAT because 
VDD is not present), the backup SRAM is powered by a dedicated low-power regulator. This 
regulator can be ON or OFF depending whether the application needs the backup SRAM 
function in Standby and VBAT modes or not. The power-down of this regulator is controlled 
by a dedicated bit, the BRE control bit of the PWR_CSR1 register (see Section 4.4.2: PWR 
power control/status register (PWR_CSR1)). 
It could be that the regulator also must be on if the board is powered from a battery, I was not 100% sure how to understand this paragraph. For the case when the board is powered by USB the regulator is only required when the CPU sleeps. We could play save and enable it all the time but maybe waste power energy or someone with a battery backed board could try `tests/periph_backup_ram`.
Or I could think of a `#define CPU_BACKUP_RAM_REGULATOR_ALWAYS_ON` somewhere.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210920/9c8e02f8/attachment.htm>

More information about the notifications mailing list