We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01660ff commit 7881e68Copy full SHA for 7881e68
targets/TARGET_STM/serial_api.c
@@ -525,6 +525,18 @@ HAL_StatusTypeDef init_uart(serial_t *obj)
525
huart->Init.Mode = UART_MODE_TX_RX;
526
}
527
528
+#if defined(LPUART1_BASE)
529
+ if (huart->Instance == LPUART1) {
530
+ if (obj_s->baudrate <= 9600) {
531
+ HAL_UARTEx_EnableClockStopMode(huart);
532
+ HAL_UARTEx_EnableStopMode(huart);
533
+ } else {
534
+ HAL_UARTEx_DisableClockStopMode(huart);
535
+ HAL_UARTEx_DisableStopMode(huart);
536
+ }
537
538
+#endif
539
+
540
return HAL_UART_Init(huart);
541
542
0 commit comments