Skip to main content
TDK
Super User
October 23, 2019
Question

STM32H747 freezes waiting for VOSRDY

  • October 23, 2019
  • 6 replies
  • 6528 views

I'm trying to boot the M7 core on a STM32H747 with a 480MHz clock rate. I have the project and clock settings configured in STM32CubeMX.  When ran, the program freezes while waiting for the VOSRDY flag to be set, which never happens.

The code appears to be doing everything it should per the reference manual:

The sequence to activate the VOS0 is the following:

  1. Ensure that the system voltage scaling is set to VOS1 by checking the VOS bits in PWR D3 domain control register (PWR D3 domain control register (PWR_D3CR))
  2. Enable the SYSCFG clock in the RCC by setting the SYSCFGEN bit in the RCC_APB4ENR register.
  3. Enable the ODEN bit in the SYSCFG_PWRCR register.
  4. Wait for VOSRDY to be set.

Once the VCORE supply has reached the required level, the system frequency can be increased.

The code is as follows:

 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
 while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} // <--- FREEZES HERE

 which runs this:

 if((__REGULATOR__) == PWR_REGULATOR_VOLTAGE_SCALE0) \
 { \
 MODIFY_REG(PWR->D3CR, PWR_D3CR_VOS, PWR_REGULATOR_VOLTAGE_SCALE1); \
 /* Delay after setting the voltage scaling */ \
 tmpreg = READ_BIT(PWR->D3CR, PWR_D3CR_VOS); \
 MODIFY_REG(SYSCFG->PWRCR, SYSCFG_PWRCR_ODEN, SYSCFG_PWRCR_ODEN); \
 /* Delay after setting the syscfg boost setting */ \
 tmpreg = READ_BIT(SYSCFG->PWRCR, SYSCFG_PWRCR_ODEN); \
 } \
 

I've verified the SYSCFGEN bit in RCC_APB4ENR is set. However, VOSRDY never gets set.

I've also verified the __HAL_PWR_GET_FLAG macro is checking the right thing.

I get the same behavior if I try to change the clock to 400MHz (VOS1), so I don't think the issue is specific to VOS0.

This is on a STM32H747I-DISCO board.

What could be wrong?

6 replies

Tesla DeLorean
Guru
October 23, 2019

Probably CubeMX ballsing things up. Seen a couple of people report similar failures.

Had these boards running via examples in CubeH7 trees

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
berendi
Principal
October 23, 2019

The CubeH7 example running at 480MHz (Applications/FPU/FPU_Fractal) sets VOLTAGE_SCALE1 first, then waits for PWR_FLAG_VOSRDY before proceeding to set SYSCFG_PWRCR_ODEN.

 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
 while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
#if (USE_VOS0_480MHZ_OVERCLOCK == 1)
 __HAL_RCC_SYSCFG_CLK_ENABLE();
 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); 
 while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}

TDK
TDKAuthor
Super User
October 23, 2019

If I add that line, it just freezes there instead. VOSRDY never gets set after setting VOS1. Doesn't make sense.

"If you feel a post has answered your question, please click ""Accept as Solution""."
berendi
Principal
October 23, 2019

Can you get one of the 480MHz example projects working, with USE_VOS0_480MHZ_OVERCLOCK defined as 1 in main.h ?

VTaya.1
Associate III
June 30, 2021

Hi.

You need to change power configuration according to hardware arrangements ( 1 SPMS only , 2 LDO only , 3 SPMS - LDO cascaded , 4 External power supply ) for reference check the STM32H745NUCLEO  schematic. Their they mush have given details about all the power configurations.

Also you need to make following changes in your code at function .

void SystemClock_Config(void)

{

 RCC_OscInitTypeDef RCC_OscInitStruct = {0};

 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};

 /** Supply configuration update enable

 */

 HAL_PWREx_ConfigSupply ( PWR_LDO_SUPPLY );

/********* change the parameter as per your power configuration , goto PWR_LDO_SUPPLY macro defination , there you will find macros other combination , select relevant one *****************/

 /** Configure the main internal regulator output voltage

 */

 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

 while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}

 /** Macro to configure the PLL clock source

 */

 __HAL_RCC_PLL_PLLSOURCE_CONFIG(RCC_PLLSOURCE_HSI);

.

.

.

.

.

}

connect your board to your PC, put the controller into debug mode, add break point after init done and test the code.

Note : if it still got stuck in waiting for voltage level to set, simply unplugged the cable, make sure no failure occurred into popped folder window for controller. put the controller in debug and hit the RUN . This worked for me.

kaspars.laizans
Associate II
June 2, 2022

Thanks. I have a board with external 3v3 supply tied to all the power pins and same behavior - won't start up in standalone, debug sessions would work if started up into system bootloader (pulling boot0 to 3v3).

What is strange - debug connection works even with PSU configured with SMPS if you comment out the check for VOSRDY. I would expect it to fail, since SMPS output messes with the rest of the power bus, but I guess it's an impedance thing. Didn't actually measure.

Setting source to LDO and scaling to 0 helped.

MNico.2
Associate
November 30, 2021

I have essentially the same issue on a STM32H7A3.

  1. __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
  2. while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} // <--- FREEZES HERE

The strange thing is that the problem occurs sometimes.

While sometime the device works properly. Even for long period, let's say

the board can work properly for some week.

I supposed it can be tied to the power supply but I can't see

any issue in the design. By the way I'm using LDO supply configuration

providing a regulated 3.3V to the device.

0693W00000GZQnwQAH.jpgI've checked the configuration and is all connected as suggested by the

manual.

Did someone managed to understand the origin of this issue?

O'li
Associate II
February 9, 2023

I'm facing a similar issue on STM32H745: on rare occasions the chip gets stuck on the VOSRDY check, and the only way to get it back on track is the BOOT0 / Reset power cycle.

Does someone have further insight on this topic?

Neuromod
Associate
March 23, 2023

Same problem here with a STM32H743. I'm trying this:

void power_init()

{

    // Enable SYSCFG peripheral clock

    uint32_t apb4enr = RCC->APB4ENR;

    RCC->APB4ENR |= RCC_APB4ENR_SYSCFGEN;

    // Enter VOS1 mode (required before entering VOS0 mode)

    PWR->D3CR |= PWR_D3CR_VOS_Msk;

    while (!(PWR->D3CR & PWR_D3CR_VOSRDY));

    // Enter VOS0 mode;

    SYSCFG->PWRCR |= SYSCFG_PWRCR_ODEN;

   

    while (!(PWR->D3CR & PWR_D3CR_VOSRDY));

    // Restore previous RCC APB4 clock register state

    RCC->APB4ENR = apb4enr;

}

and it gets stuck on the first VOSRDY loop

Associate III
December 15, 2024

i got same issue on NUCLEO-H755ZI board.

code is stuck because VOSRDY=0 always.

The power configuration is matching with this board.

Peter3718_0-1734284482365.png

 

I saw a example can be running, but the power configuration is totally not matching the board, WHY!!!! 

The 2.5V may damage the VCAP!!! but this configuration is working.

Peter3718_1-1734284627682.png