raiden00pl commented on code in PR #8945:
URL: https://github.com/apache/nuttx/pull/8945#discussion_r1155921130
##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -866,30 +885,25 @@ void stm32_stdclockconfig(void)
{
}
- /* Over-drive is needed if
- * - Voltage output scale 1 mode is selected and SYSCLK frequency is
- * over 400 MHz.
- */
+#if STM32_VOS_OVERDRIVE && (STM32_PWR_VOS_SCALE == PWR_D3CR_VOS_SCALE_1)
+ /* Over-drive support for VOS1 */
- if ((STM32_PWR_VOS_SCALE == PWR_D3CR_VOS_SCALE_1) &&
- STM32_SYSCLK_FREQUENCY > 400000000)
- {
- /* Enable System configuration controller clock to Enable ODEN */
+ /* Enable System configuration controller clock to Enable ODEN */
- regval = getreg32(STM32_RCC_APB4ENR);
- regval |= RCC_APB4ENR_SYSCFGEN;
- putreg32(regval, STM32_RCC_APB4ENR);
+ regval = getreg32(STM32_RCC_APB4ENR);
+ regval |= RCC_APB4ENR_SYSCFGEN;
+ putreg32(regval, STM32_RCC_APB4ENR);
- /* Enable Overdrive to extend the clock frequency up to 480 MHz. */
+ /* Enable Overdrive */
Review Comment:
It's already documented in the place where we define STM32_VOS_OVERDRIVE
flag:
https://github.com/raiden00pl/nuttx/blob/7c953c51d4180b5ea2e1d162bb03f0cb0f307f2c/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c#L106
Previously, the logic that decide if we need enable Overdrive was here, so
the comment in this place was OK. But now this logic is moved to preprocesor
conditionals above, so I also moved the rationale there.
--
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]