mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
stm32: Start DMA before clearing, avoid panic in updater ringbuffer impl
This commit is contained in:
parent
4fcc8e39d6
commit
3aeeeb0d78
@ -81,9 +81,9 @@ impl<'d> RingBufferedUartRx<'d> {
|
||||
/// Note: This is also done automatically by [`read()`] if required.
|
||||
pub fn start_uart(&mut self) {
|
||||
// Clear the buffer so that it is ready to receive data
|
||||
self.ring_buf.clear();
|
||||
compiler_fence(Ordering::SeqCst);
|
||||
self.ring_buf.start();
|
||||
self.ring_buf.clear();
|
||||
|
||||
let r = self.info.regs;
|
||||
// clear all interrupts and DMA Rx Request
|
||||
|
Loading…
Reference in New Issue
Block a user