1034: stm32/usart: Fix bug where USART idle flag could end a `read` prematuraly r=Dirbaio a=guillaume-michel

on STM32, when setting USART `detect_previous_overrun = true`, the idle flag is not cleared and could result in premature end of the `read` method.

This PR fixes that.

Co-authored-by: Guillaume MICHEL <guillaume@squaremind.io>
This commit is contained in:
bors[bot] 2022-10-28 11:22:53 +00:00 committed by GitHub
commit 1f246d0e37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -525,7 +525,7 @@ impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> {
}
}
if sr.idle() {
if enable_idle_line_detection && sr.idle() {
// Idle line
// stop dma transfer