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

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


@fabian18 commented on this pull request.



> +
+#include "periph_cpu.h"
+#include "stmclk.h"
+
+#ifndef BKPRAM_CONFIG
+/**
+ * @brief   Configuration to retain backup RAM content during standby mode
+ */
+#if defined(CPU_FAM_STM32F7)
+#define BKPRAM_CONFIG       (PWR_CSR1_BRE | PWR_CSR1_EIWUP)
+#else
+#define BKPRAM_CONFIG       (PWR_CSR_BRE)
+#endif
+#endif
+
+#ifndef BKPRAM_READY

I adopted the style of the `periph/pm` driver. Having to `#define BKPRAM_CONFIG` and `#define BKPRAM_READY` in `periph_cpu.h` would rather mean that something is wrong in the logic of `backup_ram.c`. So I would actually drop both: `#ifndef BKPRAM_CONFIG` and `#ifndef BKPRAM_READY`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16870#discussion_r711958010
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210920/326c0dd9/attachment.htm>


More information about the notifications mailing list