cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOfne.1
Associate III

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)
{
}

...

1 ACCEPTED SOLUTION

Accepted Solutions
Ghofrane GSOURI
ST Employee

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 

View solution in original post

2 REPLIES 2
Ghofrane GSOURI
ST Employee

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 

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