summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/uart.c
diff options
context:
space:
mode:
authorTobias Badertscher <badi@baerospace.ch>2016-06-03 14:17:01 +0200
committerDamien George <damien.p.george@gmail.com>2016-06-03 14:24:59 +0100
commit1191ec6a1477485a48db45515da3e30d136503b9 (patch)
tree370d8efbb2e0e7fb56d9aa72cccd0d8914eb007a /stmhal/uart.c
parent43c8f545d27d41c378b3765bfdb8f8c122d73dfc (diff)
downloadmicropython-1191ec6a1477485a48db45515da3e30d136503b9.tar.gz
micropython-1191ec6a1477485a48db45515da3e30d136503b9.zip
stmhal/uart.c: Fix wrong baudrate calculation for stm32l4 series.
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r--stmhal/uart.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c
index 2b6f1e40d8..210330e81a 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;