2020-07-15 09:10 PM
Hi all, I've created a few projects on a H755ZI-Q that run just fine at the default 16 MHz (I think), but I'm having trouble getting it to clock at 400 MHz. I've tried this for all of my projects which include, the Cube examples (H745), the CubeIDE New Project, and even a barebones project. All of them when running off the ST-LINK USB power attempt to set the power configuration with a call to HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY). This function consistently times out after setting the config and then waiting for the ACTVOSRDY flag to be set:
/* Set the power supply configuration */
MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource);
/* Get tick */
tickstart = HAL_GetTick ();
/* 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;
}
}
Now when I use the +5 EXT input to power the board it seems that the different boot sequence it goes through has already configured the power for PWR_DIRECT_SMPS_SUPPLY and the ACTVOSRDY flag is already set for me. So technically using the +5V is a solution for me, but I'd like to know why it doesn't work when being powered by the ST-LINK USB. Any help would be appreciated, thanks.
NOTE: I've tried much longer wait times and I can confidently says it would hang without the timeout.