2023-07-06 07:03 AM
Hello,
I have designed my own board with a STM32H7 MCU and set the "System supply configuration" to "1. LDO Supply selected" (see picture).
In the STM32CubeIDE in the IOC file under the item System Core - RCC the SupplySource is set to PWR_LDO_SUPPLY.
After that the STM32CubeIDE generates a code and at system start the device hangs at point:
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
in an infinite loop, because the PWR_FLAG_ACTVOSRDY flag is apparently not set.
/* Wait till voltage level flag is set */
while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U)
{
if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY)
{
return HAL_ERROR;
}
}
if I disable the function
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
the system works for now but as soon as I call the function "HAL_Delay" the system does not respond anymore.
How do I configure the system correctly?
Thanks and best regards Thomas
2023-07-06 07:25 AM
for useful answer it could help, to give the exact cpu type....
2023-07-06 08:07 AM
Hello @TBend.3
Adding to @AScha.3 suggestion, would you please precise the voltage scaling?
Could you explain the usage of PWR_FLAG_ACTVOSRDY?
Would you try as follows:
while (__HAL_PWR_GET_FLAG (PWR_FLAG_VOSRDY) == 0U)
Hope this helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-07-10 12:41 AM
Hi ASch.3,
thanks for your quick reply, the MCU is a STM32H730ABI6Q.
Thanks and best regards
Thomas
2023-07-10 05:54 AM
Thank you for your reply,
I use only 3V3 on the board for the VDD pins of the MCU and for the VDDLDO pins.
VDDA is via ferrite bead on 3V3 net and the VREF+ there is still a resistor to the VDDA, so also everything on 3V3.
In the STM32CubeIDE I use an empty project with an "empty" IOC file and then I generate a code from the IOC file where the above mentioned error occurs.
Thanks and best regards Thomas
2023-07-10 11:14 AM - edited 2023-07-10 11:19 AM
i made some boards with STM cpu, F030 ...also H7A3 , H733, H743 , never such problems.
BUT i also never use a HxxxQ, the smps version, to avoid problems .
special joke: buy a cpu with onchip smps, but not use smps . on some H7 is not working...but i am not sure.
AND never try cpu with "empty" ioc file. minimum is : error free clock tree, debug swd enable, useful settings for power, rcc, core, systick . if power on ALL vdd/gnd pins and 2u caps on vcap - cpu will run.
(but dont use/activate rtc, 32khz lse - this may bring new surprise.)