STM32CubeMX 6.8.0 and STM32CubeIDE 1.12.0: bug in setting PWR security with low-level drivers
Used STM32CubeIDE version: 1.12.0
Used driver library: STM32Cube_FW_U5_V1.2.0
I used low-level drivers for the PWR peripheral.
When configuring secure protection in the PWR configuration, e.g. enabling PWR Security "Voltage detection and monitoring secure protection" and "Backup domain secure protection", the code generator adds multiple calls to LL_PWR_ConfigSecure() in the function SystemPower_Config() instead of collecting the parameters and add a single call to LL_PWR_ConfigSecure().
This leads to only the last secure protection set being effective since all previous ones have been overwritten.
This is how the code generator currently inserts calls to LL_PWR_ConfigSecure():
/*
* PWR Privilege/Secure Items Configurations
*/
LL_PWR_ConfigSecure(LL_PWR_VDM_SEC);
LL_PWR_ConfigSecure(LL_PWR_VB_SEC);
And this is how the code generator should insert a single call to LL_PWR_ConfigSecure():
/*
* PWR Privilege/Secure Items Configurations
*/
LL_PWR_ConfigSecure(LL_PWR_VDM_SEC | LL_PWR_VB_SEC);
