From 5df13cb910906a322bf6a1b1719cf478f16b9b4d Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Sat, 7 Mar 2020 16:35:17 +0100 Subject: [PATCH] soc: arm: stm32: configure LDO supply on H7 init Configure the LDO supply when initializing H7 (M7) SoC. I have observed MCU hanging on LL_PWR_IsActiveFlag_VOS() wait loop when doing a cold boot if LDO supply is not explicitely enabled. According to the datasheet LDO should be enabled by default, however HAL examples also configure LDO, so there may be a reason to perform such step. Signed-off-by: Gerard Marull-Paretas --- soc/arm/st_stm32/stm32h7/soc_m7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soc/arm/st_stm32/stm32h7/soc_m7.c b/soc/arm/st_stm32/stm32h7/soc_m7.c index 7088ab48048..3486473fb35 100644 --- a/soc/arm/st_stm32/stm32h7/soc_m7.c +++ b/soc/arm/st_stm32/stm32h7/soc_m7.c @@ -88,6 +88,8 @@ static int stm32h7_init(struct device *arg) /* Power Configuration */ #ifdef SMPS LL_PWR_ConfigSupply(LL_PWR_DIRECT_SMPS_SUPPLY); +#else + LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY); #endif LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1); while (LL_PWR_IsActiveFlag_VOS() == 0) {