You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jfbblue0922 (via GitHub)" <gi...@apache.org> on 2024/05/23 10:33:46 UTC
[PR] Re-PR add stm32h755II chip [nuttx]
jfbblue0922 opened a new pull request, #12394:
URL: https://github.com/apache/nuttx/pull/12394
@acassis
@davids5
we made PR again.
・Add new CONFIG_STM32H7_PWR_LDO_SUPPLY macro to "Kconfig".
・Delete "stm32h7x5xx_rcc.c" and add ONFIG_STM32H7_PWR_LDO_SUPPLY macro to "stm32h7x3xx_rcc.c".
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1617013669
##########
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:
@davids5
We tried putting other modes into Kconfig.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1630839969
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,23 @@ 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_DIRECT_SMPS_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.
+
+ Currenlty the only supported modes are Direct SMPS supply and LDO supply.
+
+config STM32H7_PWR_LDO_SUPPLY
+ bool "Use LDO supply mode"
default n
+endchoice #"STM32 H7 Power Supply Selection"
Review Comment:
@xiaoxiang781216
I corrected it.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1613248451
##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -886,6 +886,12 @@ 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
Review Comment:
I added comment.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1628712966
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on STM32H7_HAVE_SMPS && !HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
@xiaoxiang781216
Is HAS_PWR_DIRECT_SMPS_SUPPLY defined in the wrong place?
I'm not sure where to define it correctly.
If it's in the wrong place, please tell me the correct place.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1628724081
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on STM32H7_HAVE_SMPS && !HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
All option must be defined through config keyword before using, but where do you define the new option HAS_PWR_DIRECT_SMPS_SUPPLY?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1618789143
##########
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:
@jfbblue0922 I will spend some time in the next couple of days reviewing the data sheets the and push some changes to this PR.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2139207910
> @davids5
>
> I agree with your method. I've confirmed that this method works correctly. Thank you for your help.
Great! You are very welcome. Now we just have to get CI to be happy.
Please rebase on current NuttX master and force push.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2159783865
@jerpelea
I changed it from HAS_PWR_DIRECT_SMPS_SUPPLY to STM32H7_HAVE_PWR_DIRECT_SMPS_SUPPLY
and I rebased onto the current NuttX master and force pushed.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2145166834
@jfbblue0922 - hmm Look Like CI is still not happy. @xiaoxiang781216 Any ideas what it broken?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1618664670
##########
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:
The correct thing to do is: The Kconfig should name the 6 configurations available based on the package and IC Family and the code should set them. The default should be what it was before this PR.
Putting a partial solution and jeopardizing breaking existing boards is totally un-acceptable.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1634179013
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,34 @@ config STM32H7_HAVE_SMPS
bool
default n
+config HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
@xiaoxiang781216
I changed it from HAS_PWR_DIRECT_SMPS_SUPPLY to STM32H7_HAVE_PWR_DIRECT_SMPS_SUPPLY.
##########
arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h:
##########
@@ -129,16 +129,18 @@
#define STM32_PWR_CR3_BYPASS (1 << 0) /* Bit 0: Power management unit bypass */
#define STM32_PWR_CR3_LDOEN (1 << 1) /* Bit 1: Low drop-out regulator enable */
-#define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#ifndef CONFIG_STM32H7_HAVE_SMPS
+# define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#endif
#ifdef CONFIG_STM32H7_HAVE_SMPS
-#define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
-#define STM32_PWR_CR3_SMPSEXTHP (1 << 3) /* Bit 3: SMPS step-down converter external power delivery selection */
-#define STM32_PWR_CR3_SMPSLEVEL_SHIFT (4) /* BitS 4-5: SMPS step-down converter voltage output level selection */
-# define STM32_PWR_CR3_SMPSLEVEL_MASK (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT)
-# define STM32_PWR_CR3_SMPSLEVEL_R (0 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 00: */
-# define STM32_PWR_CR3_SMPSLEVEL_1V8 (1 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 01 */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5 (2 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 10: */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5B (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 11: */
+# define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
Review Comment:
@xiaoxiang781216
I've removed the spaces and aligned the values of define.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2139185454
@davids5
I agree with your method.
I've confirmed that this method works correctly.
Thank you for your help.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1613328576
##########
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:
@davids5
STM32H7 has six power supply modes to choose from.
We use LDO supply.
I suspect someone is using a DIRECT SMPS supply.
And I don't know what the first person used.
So we don't know what the 'else' power mode is.
'else' is considered to be when nothing is defined, but I don't know how to change 'default' from 'defining nothing' in 'Kconfig'.
What do you think we should do?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1632556615
##########
arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h:
##########
@@ -129,16 +129,18 @@
#define STM32_PWR_CR3_BYPASS (1 << 0) /* Bit 0: Power management unit bypass */
#define STM32_PWR_CR3_LDOEN (1 << 1) /* Bit 1: Low drop-out regulator enable */
-#define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#ifndef CONFIG_STM32H7_HAVE_SMPS
+# define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#endif
#ifdef CONFIG_STM32H7_HAVE_SMPS
-#define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
-#define STM32_PWR_CR3_SMPSEXTHP (1 << 3) /* Bit 3: SMPS step-down converter external power delivery selection */
-#define STM32_PWR_CR3_SMPSLEVEL_SHIFT (4) /* BitS 4-5: SMPS step-down converter voltage output level selection */
-# define STM32_PWR_CR3_SMPSLEVEL_MASK (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT)
-# define STM32_PWR_CR3_SMPSLEVEL_R (0 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 00: */
-# define STM32_PWR_CR3_SMPSLEVEL_1V8 (1 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 01 */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5 (2 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 10: */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5B (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 11: */
+# define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
Review Comment:
I corrected it.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1632637883
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,34 @@ config STM32H7_HAVE_SMPS
bool
default n
+config HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
no change
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1618084948
##########
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:
I removed the 'STM32H7_PWR_DEFAULT_SUPPLY' macro in Kconfig.
I tried setting the 'STM32H7_HAVE_SMPS' macro in Kconfig to other chips.
- The "STM32 H7 Power Supply Selection" menu does not appear for STM32H7x3xx
- The "STM32 H7 Power Supply Selection" menu appears for STM32H7x5xx or STM32H7x7xx
##########
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:
This ID is from the data sheet (Reference manual RM0399).
Power control (PWR)
- Figure 22. System supply configurations

- Table 33. Supply configuration control

--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1618085133
##########
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:
Since I cannot verify the operation of these modes, I hope that those who use them will add macros.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12394:
URL: https://github.com/apache/nuttx/pull/12394
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1627705169
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on !ARCH_BOARD_NUCLEO_H745ZI && !NUCLEOH745ZI_SMPS
Review Comment:
@jfbblue0922 I suggest you create a symbol at stm32h7/Kconfig (i.e. HAS_PWM_DIRECT_SMPS_MODE) and at boards/Kconfig his symbol is enabled, this way you can add `depends on HAS_PWM_DIRECT_SMPS_MODE`.
This is how we do for other features.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1628633233
##########
boards/Kconfig:
##########
@@ -1747,6 +1747,7 @@ config ARCH_BOARD_NUCLEO_H745ZI
depends on ARCH_CHIP_STM32H745ZI
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
+ select HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
where you define HAS_PWR_DIRECT_SMPS_SUPPLY
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on STM32H7_HAVE_SMPS && !HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
where you define HAS_PWR_DIRECT_SMPS_SUPPLY
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1630840345
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on !ARCH_BOARD_NUCLEO_H745ZI && !NUCLEOH745ZI_SMPS
Review Comment:
@acassis
Thank you for your advice.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1613248932
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
I changed default value.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1618784990
##########
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:
@davids5
Before this PR, we could only use DIRECT_SMPS_SYPPLY mode or else.
And we just want to use LDO_SUPPLY mode.
Should we remove the 4 modes that no one is currently using?
And we are trying to be careful not to break the existing board.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2147064555
> @davids5 @xiaoxiang781216
>
> I rebased and pushed but nothing changed. What should we do?
Kconfig has syntax error:
```
CMake Warning at CMakeLists.txt:343 (message):
Kconfig Configuration Error: /usr/local/bin/olddefconfig:
arch/arm/src/stm32h7/Kconfig:296: error: couldn't parse 'Currenlty the only
supported modes are Direct SMPS supply and LDO supply.': syntax error
CMake Error at CMakeLists.txt:348 (message):
Failed to initialize Kconfig configuration:
-- Initializing NuttX
CMake Warning at CMakeLists.txt:343 (message):
-- Configuring incomplete, errors occurred!
Kconfig Configuration Error: /usr/local/bin/olddefconfig:
arch/arm/src/stm32h7/Kconfig:296: error: couldn't parse 'Currenlty the only
supported modes are Direct SMPS supply and LDO supply.': syntax error
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1630840978
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on STM32H7_HAVE_SMPS && !HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
I corrected it.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2145187475
ci break is fixed one week ago, @jfbblue0922 please rebase your patch to the latest master.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2147046133
@davids5
@xiaoxiang781216
I rebased and pushed but nothing changed.
What should we do?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1625687533
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,23 @@ 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_DIRECT_SMPS_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.
+
+ Currenlty the only supported modes are Direct SMPS supply and LDO supply.
+
+config STM32H7_PWR_LDO_SUPPLY
+ bool "Use LDO supply mode"
default n
+endchoice #"STM32 H7 Power Supply Selection"
Review Comment:
```suggestion
endchoice
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,23 @@ 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_DIRECT_SMPS_SUPPLY
Review Comment:
where you define STM32H7_PWR_DIRECT_SMPS_SUPPLY
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jfbblue0922 (via GitHub)" <gi...@apache.org>.
jfbblue0922 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1630840714
##########
boards/Kconfig:
##########
@@ -1747,6 +1747,7 @@ config ARCH_BOARD_NUCLEO_H745ZI
depends on ARCH_CHIP_STM32H745ZI
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
+ select HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
@xiaoxiang781216
I added HAS_PWR_DIRECT_SMPS_SUPPLY to stm32h7/Kconfig.
Thank you for your advice.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1611468553
##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -886,6 +886,12 @@ 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
Review Comment:
Add Comment as to what mode this else is.
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
I do not think the default is correct. Before the change the what branch of the https://github.com/apache/nuttx/pull/12394/files#diff-9dfe671931738d39252fc8e902e892d172ac118551d14e1a454e324edb0d0be4R889-R897 would have been selected.
We have to be super carful here not break existing boards. That had the default set BEFORE this change
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "jerpelea (via GitHub)" <gi...@apache.org>.
jerpelea commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2159846738
> @jerpelea
>
> I changed it from HAS_PWR_DIRECT_SMPS_SUPPLY to STM32H7_HAVE_PWR_DIRECT_SMPS_SUPPLY and I rebased onto the current NuttX master and force pushed.
if you check the patch there is no commit message
you can reuse the same message as the one it PR
git commit --amend
type the message and save
git push -f
this will update the current patch without the need to abort it
Best regards
Alin
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1627543032
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,10 +284,24 @@ config STM32H7_HAVE_SMPS
bool
default n
+choice
+ prompt "STM32 H7 Power Supply Selection"
+ default STM32H7_PWR_DIRECT_SMPS_SUPPLY
+ depends on !ARCH_BOARD_NUCLEO_H745ZI && !NUCLEOH745ZI_SMPS
Review Comment:
A board can not be used here.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#discussion_r1630962729
##########
arch/arm/src/stm32h7/Kconfig:
##########
@@ -284,11 +284,34 @@ config STM32H7_HAVE_SMPS
bool
default n
+config HAS_PWR_DIRECT_SMPS_SUPPLY
Review Comment:
```suggestion
config STM32H7_HAVE_PWR_DIRECT_SMPS_SUPPLY
```
##########
arch/arm/src/stm32h7/hardware/stm32h7x3xx_pwr.h:
##########
@@ -129,16 +129,18 @@
#define STM32_PWR_CR3_BYPASS (1 << 0) /* Bit 0: Power management unit bypass */
#define STM32_PWR_CR3_LDOEN (1 << 1) /* Bit 1: Low drop-out regulator enable */
-#define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#ifndef CONFIG_STM32H7_HAVE_SMPS
+# define STM32_PWR_CR3_SCUEN (1 << 2) /* Bit 2: Supply configuration update enable */
+#endif
#ifdef CONFIG_STM32H7_HAVE_SMPS
-#define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
-#define STM32_PWR_CR3_SMPSEXTHP (1 << 3) /* Bit 3: SMPS step-down converter external power delivery selection */
-#define STM32_PWR_CR3_SMPSLEVEL_SHIFT (4) /* BitS 4-5: SMPS step-down converter voltage output level selection */
-# define STM32_PWR_CR3_SMPSLEVEL_MASK (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT)
-# define STM32_PWR_CR3_SMPSLEVEL_R (0 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 00: */
-# define STM32_PWR_CR3_SMPSLEVEL_1V8 (1 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 01 */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5 (2 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 10: */
-# define STM32_PWR_CR3_SMPSLEVEL_2V5B (3 << STM32_PWR_CR3_SMPSLEVEL_SHIFT) /* 11: */
+# define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
Review Comment:
```suggestion
# define STM32_PWR_CR3_SDEN (1 << 2) /* Bit 2: SMPS step-down converter enable */
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Re-PR add stm32h755II chip [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #12394:
URL: https://github.com/apache/nuttx/pull/12394#issuecomment-2137523349
@jfbblue0922 Please see https://github.com/nuttx-to-asf/incubator-nuttx/commit/c6cedbaa23161950b18caed94af54b549ef8a4b1
It is the approach I had suggested originally. It adds the LDO mode with a chip the has SMPS. Please cherry-pick it to your branch and test it does what you needed. If it is fine then please squash it and force push.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org