Skip to main content
SRugg.1
Visitor II
Apr 14, 2021 3:57 AM UTC
Solved

How to change power supply configuration in an example?

I am using the example for a LWIP HTTP server, given by STM here. However, the clock configuration configures the supply to be PWR_LDO_SUPPLY. However, my board is configured to accept PWR_SMPS_DIRECT_SUPPLY, and I do not have the tools to reconfigure my board. Could someone explain how I can change this option in the example? I tried doing it directly but it has way more dependencies elsewhere and there is no .ioc configuration to generate it automatically.

I am new to STM32 boards and lower level MCU in general, so please keep that in mind.

This topic has been closed for replies.
Walid ZRELLI
Walid ZRELLIBest answer
Visitor II
May 25, 2021 1:48 PM UTC

Hello @SRugg.1​ ,

You just have to replace HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY) ; by HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY) ; in the SystemClock_Config() function.

Take a look at this link it might be helpful.

BeST Regards,

Walid

1 reply

Walid ZRELLI
Walid ZRELLIBest answer
Visitor II
May 25, 2021 1:48 PM UTC

Hello @SRugg.1​ ,

You just have to replace HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY) ; by HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY) ; in the SystemClock_Config() function.

Take a look at this link it might be helpful.

BeST Regards,

Walid