8000 stmhal/uart.c: Fix wrong baudrate calculation for stm32l4 series. · lapsule/micropython@1191ec6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1191ec6

Browse files
tobbaddpgeorge
authored andcommitted
stmhal/uart.c: Fix wrong baudrate calculation for stm32l4 series.
1 parent 43c8f54 commit 1191ec6

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

stmhal/uart.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con
579579
} else {
580580
actual_baudrate = HAL_RCC_GetPCLK1Freq();
581581
}
582-
#if defined(MCU_SERIES_L4)
583-
actual_baudrate = (actual_baudrate << 5) / (self->uart.Instance->BRR >> 3);
584-
#else
585582
actual_baudrate /= self->uart.Instance->BRR;
586-
#endif
587583

588584
// check we could set the baudrate within 5%
589585
uint32_t baudrate_diff;

0 commit comments

Comments
 (0)
0