How to unlock power supply configuration on STM32H742? HAL_PWREx_ConfigSupply() fails
Hi!
I'd like to reconfigure power supply settings on our custom board with an STM32H742.
I've done some research reading reference manual and application note.
CubeMX has generated code with the following two calls I am using inside of SystemClock_Config():
HAL_PWREx_ConfigSupply(PWR_EXTERNAL_SOURCE_SUPPLY);
...
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
...
This seems to make sense for me. However, HAL_PWREx_ConfigSupply() returns with a HAL_ERROR error code as it seems that the "Supply configuration update enable" bit (PWR_CR3->SCUEN) is not set.
Is there any HAL or LL API function that I must call to set the bit?
Or do it completely manual (which feels wrong right now)?
Or am I missing some other setting/prerequisite here?
I don't want to brick my controller. :grinning_face:
Best regards
