stm32/usart: fix usart not wake up issue
This commit is contained in:
parent
2c38dd17b9
commit
582ef90994
@ -545,6 +545,13 @@ impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> {
|
|||||||
unsafe { rdr(r).read_volatile() };
|
unsafe { rdr(r).read_volatile() };
|
||||||
clear_interrupt_flags(r, sr);
|
clear_interrupt_flags(r, sr);
|
||||||
|
|
||||||
|
if enable_idle_line_detection {
|
||||||
|
// enable idle interrupt
|
||||||
|
r.cr1().modify(|w| {
|
||||||
|
w.set_idleie(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
compiler_fence(Ordering::SeqCst);
|
compiler_fence(Ordering::SeqCst);
|
||||||
|
|
||||||
let has_errors = sr.pe() || sr.fe() || sr.ne() || sr.ore();
|
let has_errors = sr.pe() || sr.fe() || sr.ne() || sr.ore();
|
||||||
|
Loading…
Reference in New Issue
Block a user