diff options
author | Vikas Manocha <vikas.manocha@st.com> | 2017-05-28 12:55:12 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-09 11:23:59 -0400 |
commit | 6c0c3ce8aa794e972ef173694e148ddc9b7d6bcb (patch) | |
tree | c55f7dd57452b9896374a0642bfaf9aadad3e6b1 /drivers/serial/serial_stm32x7.c | |
parent | c6d9e9dbc3d02c03ea1f6671034317593a2ea4ff (diff) |
serial: stm32f7: disable overrun
With overrun enabled, serial port console freezes & stops receiving data with
overun error if we keep sending data.
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Diffstat (limited to 'drivers/serial/serial_stm32x7.c')
-rw-r--r-- | drivers/serial/serial_stm32x7.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c index bdabf87e50..483e4ba67d 100644 --- a/drivers/serial/serial_stm32x7.c +++ b/drivers/serial/serial_stm32x7.c @@ -93,6 +93,9 @@ static int stm32_serial_probe(struct udevice *dev) } #endif + /* Disable usart-> disable overrun-> enable usart */ + clrbits_le32(&usart->cr1, USART_CR1_RE | USART_CR1_TE | USART_CR1_UE); + setbits_le32(&usart->cr3, USART_CR3_OVRDIS); setbits_le32(&usart->cr1, USART_CR1_RE | USART_CR1_TE | USART_CR1_UE); return 0; |