From f3676c945a4dce74cb1379dba0f1d8473e6ef5cc Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 7 Dec 2019 02:48:55 +0100 Subject: [PATCH] zynq::flash: flush after instruction --- src/zynq/flash/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zynq/flash/mod.rs b/src/zynq/flash/mod.rs index 8c04cc9..8b294c2 100644 --- a/src/zynq/flash/mod.rs +++ b/src/zynq/flash/mod.rs @@ -366,6 +366,10 @@ impl<'a, Args: Iterator> Transfer<'a, Args> { unsafe { flash.regs.txd1.write(inst_code.into()); } + flash.regs.config.modify(|_, w| w.man_start_com(true)); + // Flush after `txd1` access + while !flash.regs.intr_status.read().tx_fifo_not_full() {} + while !flash.regs.intr_status.read().tx_fifo_full() { let arg = args.next().unwrap_or(0); unsafe {