davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1613246450


##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,27 @@ config STM32H7_HAVE_SMPS
        bool
        default n
 
+choice
+       prompt "STM32 H7 Power Supply Selection"
+       default STM32H7_PWR_DEFAULT_SUPPLY
+       depends on ARCH_CHIP_STM32H7
+       ---help---
+            Select the power supply mode of your board
+
+config STM32H7_PWR_DEFAULT_SUPPLY
+       bool "Default"
+

Review Comment:
   Add help to all these  `config`s to describe what mode it is, based on the 
bits selected by `STM32 H7 Power Supply Selection`



##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -886,7 +886,19 @@ 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);
 #else
+      /* 4 else cases of power supply mode

Review Comment:
   There are 3 settings. 2 are covered above.
   
   What is the "4 else cases of power supply mode" referring too. This it the 
third. It is the default STM32H7_PWR_DEFAULT_SUPPLY.  should there be another 
else with #error "No a STM32 H7 Power Supply Selection made"?



-- 
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]

Reply via email to