Skip to content

Commit b5e5cdd

Browse files
raiden00plxiaoxiang781216
authored andcommitted
arch/arm/stm32h7: add workaround for Renode
Add an option to disable busy wait PWR_CSR1_ACTVOSRDY during boot which doesn't work with Renode simulation
1 parent 8b9337f commit b5e5cdd

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

arch/arm/src/stm32h7/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,13 @@ config STM32H7_PWR_LDO_SUPPLY
318318

319319
endchoice # "STM32 H7 Power Supply Selection"
320320

321+
config STM32H7_PWR_IGNORE_ACTVOSRDY
322+
bool "Ignore PWR_CSR1_ACTVOSRDY bit"
323+
default n
324+
---help---
325+
This option disable busy wait for PWR_CSR1_ACTVOSRDY during boot.
326+
This is workaround for Renode simulation that doesn't implement this feature.
327+
321328
config STM32H7_IO_CONFIG_A
322329
bool
323330
default n

arch/arm/src/stm32h7/stm32h7x3xx_rcc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,11 +926,13 @@ void stm32_stdclockconfig(void)
926926
{
927927
}
928928

929+
#ifndef CONFIG_STM32H7_PWR_IGNORE_ACTVOSRDY
929930
/* See Reference manual Section 5.4.1, System supply startup */
930931

931932
while ((getreg32(STM32_PWR_CSR1) & PWR_CSR1_ACTVOSRDY) == 0)
932933
{
933934
}
935+
#endif
934936

935937
#if STM32_VOS_OVERDRIVE && (STM32_PWR_VOS_SCALE == PWR_D3CR_VOS_SCALE_1)
936938
/* Over-drive support for VOS1 */

arch/arm/src/stm32h7/stm32h7x7xx_rcc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,11 +890,13 @@ void stm32_stdclockconfig(void)
890890
{
891891
}
892892

893+
#ifndef CONFIG_STM32H7_PWR_IGNORE_ACTVOSRDY
893894
/* See Reference manual Section 5.4.1, System supply startup */
894895

895896
while ((getreg32(STM32_PWR_CSR1) & PWR_CSR1_ACTVOSRDY) == 0)
896897
{
897898
}
899+
#endif
898900

899901
#if STM32_VOS_OVERDRIVE && (STM32_PWR_VOS_SCALE == PWR_D3CR_VOS_SCALE_1)
900902
/* Over-drive support for VOS1 */

0 commit comments

Comments
 (0)