]> git.baikalelectronics.ru Git - arm-tf.git/commit
refactor(st-uart): compute the over sampling dynamically
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 2 Mar 2022 14:29:08 +0000 (15:29 +0100)
committerYann Gautier <yann.gautier@st.com>
Fri, 23 Sep 2022 13:17:43 +0000 (15:17 +0200)
commit12581895158f0ff43f277d991c62ea7d0478a836
tree23ff3b22c7edd4a70a8adac4b1e148c58517c717
parent278bc857d8a6a317f8598ee5ade04a8914e6d110
refactor(st-uart): compute the over sampling dynamically

The parameter over_sampling of stm32_uart_init_s is not required
as it can be computed dynamically from clock rate of the serial
device and the requested baudrate.

Oversampling by 8 is allowed only for higher speed
(up to clock_rate / 8) to reduce the maximum receiver tolerance
to clock deviation.

This patch update the driver, the serial init struct and the
only user, the stm32cubeprogrammer over uart support.

Change-Id: I422731089730a288defeb7fa49886db65d0902b2
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/st/uart/stm32_uart.c
include/drivers/st/stm32_uart.h
plat/st/common/stm32cubeprogrammer_uart.c