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: Manojkumar Subramaniam <manoj@electrolance.com>
This commit is contained in:
parent
86a6280ed7
commit
22186c7c51
1 changed files with 3 additions and 1 deletions
|
@ -80,8 +80,10 @@ static int stm32h7_init(const struct device *arg)
|
||||||
SystemCoreClock = 64000000;
|
SystemCoreClock = 64000000;
|
||||||
|
|
||||||
/* Power Configuration */
|
/* Power Configuration */
|
||||||
#ifdef SMPS
|
#if defined(SMPS) && defined(CONFIG_POWER_SUPPLY_SMPS)
|
||||||
LL_PWR_ConfigSupply(LL_PWR_DIRECT_SMPS_SUPPLY);
|
LL_PWR_ConfigSupply(LL_PWR_DIRECT_SMPS_SUPPLY);
|
||||||
|
#elif defined(CONFIG_POWER_SUPPLY_SMPS)
|
||||||
|
#error Unsupported configuration: Selected SoC do not support SMPS
|
||||||
#else
|
#else
|
||||||
LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY);
|
LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue