Commit 49dbd0ef authored by Manojkumar Subramaniam's avatar Manojkumar Subramaniam Committed by github-actions[bot]
Browse files

soc: arm: st_stm32: use SMPS power supply only if enabled


Use SMPS power supply only if enabled.

The default power supply configuration for the
NUCLEO board with -Q subfix is SMPS,
so it's essential to match with hardware configuration
to avoid deadlocks due to mismatch.

if a custom board with LDO configuration is in use,
then no need to enable `CONFIG_POWER_SUPPLY_SMPS`
Signed-off-by: default avatarManojkumar Subramaniam <manoj@electrolance.com>
parent 09a15ded
Showing with 3 additions and 1 deletion
+3 -1
......@@ -80,8 +80,10 @@ static int stm32h7_init(const struct device *arg)
SystemCoreClock = 64000000;
/* Power Configuration */
#ifdef SMPS
#if defined(SMPS) && defined(CONFIG_POWER_SUPPLY_SMPS)
LL_PWR_ConfigSupply(LL_PWR_DIRECT_SMPS_SUPPLY);
#elif defined(CONFIG_POWER_SUPPLY_SMPS)
#error Unsupported configuration: Selected SoC do not support SMPS
#else
LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment