diff --git a/stmhal/uart.c b/stmhal/uart.c index 2b6f1e40d8e5b835323ee19db8b1ea43a7029f75..210330e81afed35b1cf210cd3aa93f4ec5c33a79 100644 --- a/stmhal/uart.c +++ b/stmhal/uart.c @@ -579,11 +579,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con } else { actual_baudrate = HAL_RCC_GetPCLK1Freq(); } - #if defined(MCU_SERIES_L4) - actual_baudrate = (actual_baudrate << 5) / (self->uart.Instance->BRR >> 3); - #else actual_baudrate /= self->uart.Instance->BRR; - #endif // check we could set the baudrate within 5% uint32_t baudrate_diff;