summaryrefslogtreecommitdiff
path: root/ports/stm32/powerctrl.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-12-20 17:00:59 +1100
committerDamien George <damien@micropython.org>2023-03-21 14:02:49 +1100
commit13fcd8440e58f0a4eb14d8c2762c73b05bf3e8e6 (patch)
treecf88fba5f8d2e2be80732b7187d6c94eb9129448 /ports/stm32/powerctrl.c
parent3187e4c7e7fe0f0596453dbdb3e909a299c7de7d (diff)
stm32: Add support for STM32H723 MCUs.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/powerctrl.c')
-rw-r--r--ports/stm32/powerctrl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/stm32/powerctrl.c b/ports/stm32/powerctrl.c
index 498fb79d7..0ab80b487 100644
--- a/ports/stm32/powerctrl.c
+++ b/ports/stm32/powerctrl.c
@@ -33,11 +33,9 @@
#if defined(STM32H7)
#define RCC_SR RSR
-#if defined(STM32H743xx) || defined(STM32H750xx)
-#define RCC_SR_SFTRSTF RCC_RSR_SFTRSTF
-#elif defined(STM32H747xx)
+#if defined(STM32H747xx)
#define RCC_SR_SFTRSTF RCC_RSR_SFT2RSTF
-#elif defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
+#else
#define RCC_SR_SFTRSTF RCC_RSR_SFTRSTF
#endif
#define RCC_SR_RMVF RCC_RSR_RMVF
@@ -48,6 +46,8 @@
defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
// TODO
#define POWERCTRL_GET_VOLTAGE_SCALING() PWR_REGULATOR_VOLTAGE_SCALE0
+#elif defined(STM32H723xx)
+#define POWERCTRL_GET_VOLTAGE_SCALING() LL_PWR_GetRegulVoltageScaling()
#else
#define POWERCTRL_GET_VOLTAGE_SCALING() \
(((PWR->CSR1 & PWR_CSR1_ACTVOS) && (SYSCFG->PWRCR & SYSCFG_PWRCR_ODEN)) ? \