davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1617037732
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,55 @@ config STM32H7_HAVE_SMPS
bool
default n
-config STM32H7_PWR_DIRECT_SMPS_SUPPLY
- bool "Use direct SMPS supply mode"
+choice
+ prompt "STM32 H7 Power Supply Selection"
Review Comment:
@jfbblue0922 Please build test these changes for other version of the IC.
STM32H7_PWR_DEFAULT_SUPPLY - is not defined
STM32H7_HAVE_SMPS - will disable the choices
##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -886,6 +886,20 @@ void stm32_stdclockconfig(void)
STM32_PWR_CR3_SMPSEXTHP | STM32_PWR_CR3_SMPSLEVEL_MASK);
regval |= STM32_PWR_CR3_SCUEN;
putreg32(regval, STM32_PWR_CR3);
+#elif defined(CONFIG_STM32H7_PWR_LDO_SUPPLY)
+ regval = getreg32(STM32_PWR_CR3);
+ regval &= ~(STM32_PWR_CR3_BYPASS | STM32_PWR_CR3_SCUEN |
+ STM32_PWR_CR3_SMPSEXTHP | STM32_PWR_CR3_SMPSLEVEL_MASK);
+ regval |= STM32_PWR_CR3_LDOEN;
+ putreg32(regval, STM32_PWR_CR3);
+#elif defined(CONFIG_STM32H7_PWR_SMPS_LDO) || \
+ defined(CONFIG_STM32H7_PWR_EXT_SMPS_LDO) || \
+ defined(CONFIG_STM32H7_PWR_EXT_SMPS_BYPASS) || \
+ defined(CONFIG_STM32H7_PWR_BYPASS)
+ /* These 4 cases of power supply mode have no macros created.
+ * Selecting one of these modes will cause a compile error.
+ */
+ #error Macro of this power supply mode is not created yet.
Review Comment:
What would a user be expected to do if they get this message?
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,55 @@ config STM32H7_HAVE_SMPS
bool
default n
-config STM32H7_PWR_DIRECT_SMPS_SUPPLY
- bool "Use direct SMPS supply mode"
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DEFAULT_SUPPLY
depends on STM32H7_HAVE_SMPS
+ ---help---
+ The STM32H7x5 and STM32H7x7 support power supply configrations for
the VCORE core domain and an external supply,
+ by configuring the SMPS step-down converter and voltage regulator.
+ Note:The SMPS step-down converter is not available on all packages.
+
+ Select the power supply mode of your board
+ - ID:1 LDO supply mode used 'STM32H7_PWR_LDO_SUPPLY' macro
Review Comment:
How does ID:x relate to the choices?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]