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

STM32CubeMX 6.8.0 and STM32CubeIDE 1.12.0: bug in LSI initialization when using low-level drivers

  • July 25, 2023
  • 2 replies
  • 1347 views

Used STM32CubeIDE version: 1.12.0
Used driver library: STM32Cube_FW_U5_V1.2.0

I found a bug in the initialization of the LSI, when low-level drivers are used. The bug is located in the function SystemClock_Config(). Since the background domain access is not enabled before trying to enable the LSI, the loop which is waiting for the LSI to come up is never left.

...

LL_PWR_EnableBkUpAccess();              // <-- this line is missing in the generated code

LL_RCC_LSI_Enable();

/* Wait till LSI is ready */
while(LL_RCC_LSI_IsReady() != 1)
{
}

...

    This topic has been closed for replies.
    Best answer by Ghofrane GSOURI

    Hello @SOfne.1 

    First let me thank you for posting.

    Actually I tried to reproduce the issue mentioned above using STM32U575,CubeMX 6.9.0 and STM32CubeIDE 1.13.0 and this is what I got please have a look

    GhofraneGSOURI_0-1690360919503.png

    "LL_PWR_EnableBkUpAccess()"  does exist in the generated code.

    Thx

    Ghofrane 

    2 replies

    Ghofrane GSOURI
    Ghofrane GSOURIBest answer
    ST Technical Moderator
    July 26, 2023

    Hello @SOfne.1 

    First let me thank you for posting.

    Actually I tried to reproduce the issue mentioned above using STM32U575,CubeMX 6.9.0 and STM32CubeIDE 1.13.0 and this is what I got please have a look

    GhofraneGSOURI_0-1690360919503.png

    "LL_PWR_EnableBkUpAccess()"  does exist in the generated code.

    Thx

    Ghofrane 

    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.
    SOfne.1
    SOfne.1Author
    Associate II
    July 26, 2023

    Hi Ghofrane,

    the code you generated is OK.

    Seems that the bug has already been fixed with STMCubeIDE 1.13.0.

    (I currently use v1.12.0)

    Thanks

    Sebastian