2023-02-04 05:59 AM
Hello, Just a quick heads up regarding LL implementation of LSI.
It fails to start, while same setup generated for HAL works as it should.
Now looking in detail whats wrong in register level calls, will post my results.
ST, I hope you will find and fix this issue with LL code generation, thank you !
Solved! Go to Solution.
2023-02-07 06:14 AM
Hello @Linas L,
Thank you for bringing this issue to our attention.
I confirm the issue and I reported Internally.
Internal ticket number: 144718 (This is an internal tracking number and is not accessible or usable by customers).
Kaouthar
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.
2023-02-04 06:21 AM
Find a problem while reading RM.
LL code simply tries to
LL_RCC_LSI_Enable();
/* Wait till LSI is ready */
while(LL_RCC_LSI_IsReady() != 1)
{
}
Problem is, in order to access backup domain, PWR->DBPR needs to be set to 1, this will allow to set LSI bit in RCC->BDCR register.
Solution is simply:
PWR->DBPR = 1;
That is it. please add this by default into LL configuration, since it is nice when code runs without looping in LL_RCC_LSI_IsReady().
Thank you !
2023-02-04 11:57 AM
Interesting.
This makes the 'U5 probably the only STM32 family where LSI is in the backup domain (with the consequence you've described).
Thanks for investigating and coming back with the result.
JW
2023-02-04 02:16 PM
This is because LL is, well... low level. This API is very fine granular and gives a lot more control to the user.
The /*beginner-proof*/ HAL driver does enable the backup domain write.
2023-02-05 03:05 AM
I would say, if user select LL libraries, it should reach while(1) in main and not get stuck, unless you need to enable oscillators or any other hardware dependent devices that could lock start procedure.
LL code generation is already limited, but user should not need to check each line of generated code to see if it's missing something.
If I enable IWDG, i would expect LSI already working as it should with no user intervention.
2023-02-07 06:14 AM
Hello @Linas L,
Thank you for bringing this issue to our attention.
I confirm the issue and I reported Internally.
Internal ticket number: 144718 (This is an internal tracking number and is not accessible or usable by customers).
Kaouthar
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.
2023-07-14 03:08 AM
Hello @Linas L ,
This issue is solved in the STM32CubeMX 6.9.0 version.
Thank you for your contribution in STCommunity.
Kaouthar
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.