File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
hal/targets/hal/TARGET_STM/TARGET_STM32L0 Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,13 @@ static void init_uart(serial_t *obj)
53
53
{
54
54
UartHandle .Instance = (USART_TypeDef * )(obj -> uart );
55
55
56
- if (obj -> uart == LPUART_1 ) {
57
- UartHandle .Init .BaudRate = obj -> baudrate >> 1 ;
58
- } else {
59
- UartHandle .Init .BaudRate = obj -> baudrate ;
60
- }
56
+ UartHandle .Init .BaudRate = obj -> baudrate ;
61
57
UartHandle .Init .WordLength = obj -> databits ;
62
58
UartHandle .Init .StopBits = obj -> stopbits ;
63
59
UartHandle .Init .Parity = obj -> parity ;
64
60
UartHandle .Init .HwFlowCtl = UART_HWCONTROL_NONE ;
61
+ UartHandle .Init .OverSampling = UART_OVERSAMPLING_16 ;
62
+ UartHandle .Init .OneBitSampling = UART_ONE_BIT_SAMPLE_ENABLE ;
65
63
66
64
if (obj -> pin_rx == NC ) {
67
65
UartHandle .Init .Mode = UART_MODE_TX ;
You can’t perform that action at this time.
0 commit comments