Merge pull request #3724 from CNLHC/qspi_waiting_condition
FIX: QSPI synchronous read operation hangs when FIFO is not full
This commit is contained in:
commit
7c3099b9e2
@ -172,7 +172,7 @@ impl<'d, T: Instance, M: PeriMode> Qspi<'d, T, M> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for b in buf {
|
for b in buf {
|
||||||
while !T::REGS.sr().read().tcf() && !T::REGS.sr().read().ftf() {}
|
while !T::REGS.sr().read().tcf() && (T::REGS.sr().read().flevel() == 0) {}
|
||||||
*b = unsafe { (T::REGS.dr().as_ptr() as *mut u8).read_volatile() };
|
*b = unsafe { (T::REGS.dr().as_ptr() as *mut u8).read_volatile() };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user