File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,11 @@ static uint32_t get_hclk_frequency(void)
260260static int32_t prepare_regulator_voltage_scale (void )
261261{
262262 /* Make sure to put the CPU in highest Voltage scale during clock configuration */
263+ #if defined(SMPS ) && defined(CONFIG_POWER_SUPPLY_SMPS )
264+ LL_PWR_ConfigSupply (LL_PWR_DIRECT_SMPS_SUPPLY );
265+ #else
263266 LL_PWR_ConfigSupply (LL_PWR_LDO_SUPPLY );
267+ #endif
264268 /* Highest voltage is SCALE0 */
265269 LL_PWR_SetRegulVoltageScaling (LL_PWR_REGU_VOLTAGE_SCALE0 );
266270 return 0 ;
@@ -276,7 +280,11 @@ static int32_t optimize_regulator_voltage_scale(uint32_t sysclk_freq)
276280 /* LL_PWR_REGULATOR_SCALE3 is lowest power consumption */
277281 /* Must be done in accordance to the Maximum allowed frequency vs VOS*/
278282 /* See RM0433 page 352 for more details */
283+ #if defined(SMPS ) && defined(CONFIG_POWER_SUPPLY_SMPS )
284+ LL_PWR_ConfigSupply (LL_PWR_DIRECT_SMPS_SUPPLY );
285+ #else
279286 LL_PWR_ConfigSupply (LL_PWR_LDO_SUPPLY );
287+ #endif
280288 LL_PWR_SetRegulVoltageScaling (LL_PWR_REGU_VOLTAGE_SCALE0 );
281289 return 0 ;
282290}
You can’t perform that action at this time.
0 commit comments