Description
In the current configuration, LSE is forced selected when baudrate <= 9600 is selected for HW Serial.
If LSE is not present UART kernel won't work.
A propose is to add a check after enabling the LSE, if the LSE is ready. Use the LL_RCC_LSE_IsReady()
before changing the kernel clock of the LPUART.
Arduino_Core_STM32/libraries/SrcWrapper/src/stm32/uart.c
Lines 457 to 471 in eebd0e3
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
fpistm commentedon Jan 27, 2025
Hi @MaJerle
Nice to see you here 😉
You're right a check can be added.
I guess it could be added here:
Arduino_Core_STM32/libraries/SrcWrapper/src/stm32/clock.c
Line 137 in eebd0e3
Please, could you create a PR for this?
MaJerle commentedon Jan 27, 2025
I'm no expert in the STM32duino development processes, as such I prefer to not create PRs that may be wrongly coded.
The check should be added before LPUART kernel clock is being selected, in
uart.c
file.chore(uart): set LSE as source only if LSE is ready
chore(uart): set LSE as source only if LSE is ready
chore(uart): set LSE as source only if LSE is ready