Skip to main content
SOfne.1
Associate II
July 17, 2023
Solved

STM32CubeMX 6.8.0 and STM32CubeIDE 1.12.0: bug in setting PWR security with low-level drivers

  • July 17, 2023
  • 1 reply
  • 1731 views

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().

STM32CubeIDE code generator PWR.PNG

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);

    This topic has been closed for replies.
    Best answer by Foued_KH

    Hello @SOfne.1 ,

    Thank you for bringing this issue to our attention.

    I confirm the issue and I reported internally.

    Internal ticket number: 157463 (This is an internal tracking number and is not accessible or usable by customers).

    Foued

    1 reply

    Foued_KH
    Foued_KHBest answer
    ST Employee
    July 18, 2023

    Hello @SOfne.1 ,

    Thank you for bringing this issue to our attention.

    I confirm the issue and I reported internally.

    Internal ticket number: 157463 (This is an internal tracking number and is not accessible or usable by customers).

    Foued

    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.