HAL_PWREx_ControlVoltageScaling Timeout when VDD startup ramp is slow.
- June 20, 2026
- 0 replies
- 49 views
Hello. I’m facing strange issue in my design with STM32U575RGT6, revision “U”.
Finally I discovered what is going on, but I don’t have ideas how to fix this.
I’m using electronic switch to power ON and OFF the device:

VBATT is 4.2V Li-Ion battery.
One half of BAV70 diode is controlled by manual SWITCH (to power ON), second one by IO pin from uC (to maintain ON, and to OFF).
Problem is that my program often hangs up in this function (I added LED blinks inside):
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
{
while (1)
{
HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_SET);
HAL_Delay(100);
HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_RESET);
HAL_Delay(1000);
}
Error_Handler();
}Voltage on VCAP pins is 0.9 V, and often freezes in this level. Rarely steps up to 1.2V and program normally continues.
I finally discovered that is caused by slow rising of VDD voltage. This is from my electronic switch:

I can bypass the electronic switch and supply 3.3V directly from the laboratory power supply to the VDD bus. Here's what I get:

This time uC starts up every time properly (switching from 0.9 V to 1.2 V on VCAP and program continues).
But with slower VDD rising, It wont work.
I set BOR to level 4 (2.8 V), but it didn't change anything.
VDDA is connected directly do VDD, so there are no voltage differences between them.
VBAT is 0 V (no RTC battery inserted).

Adding delays before SystemClock_Config() function call, also don’t help. Holding RESET in low state until VDD settle, also don’t help.
I don’t understand why.
What can be done with it? (without accelerating the voltage rise time, because the limited slew rate is intentional.in my circuit).
