-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
enhancementNew feature or requestNew feature or request
Milestone
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
| if (baudrate <= 9600) { | |
| /* Enable the clock if not already set by user */ | |
| enableClock(LSE_CLOCK); | |
| if (obj->uart == LPUART1) { | |
| __HAL_RCC_LPUART1_CONFIG(RCC_LPUART1CLKSOURCE_LSE); | |
| } | |
| #if defined(LPUART2_BASE) | |
| if (obj->uart == LPUART2) { | |
| __HAL_RCC_LPUART2_CONFIG(RCC_LPUART2CLKSOURCE_LSE); | |
| } | |
| #endif | |
| #if defined(LPUART3_BASE) | |
| if (obj->uart == LPUART3) { | |
| __HAL_RCC_LPUART3_CONFIG(RCC_LPUART3CLKSOURCE_LSE); | |
| } |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done