diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-01-07 20:38:51 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-07 20:38:51 +0000 |
| commit | 7c3099b9e2273b47eea397f294444d838045df78 (patch) | |
| tree | 1c14b50e319d1771abf09e1c6a93ed2128bbf5b0 | |
| parent | 33d6f654533dac540a64cf56378b43ec613f108e (diff) | |
| parent | cfd5c92375a10c33c9aeb3cecbc2bdb6dd399f1b (diff) | |
Merge pull request #3724 from CNLHC/qspi_waiting_condition
FIX: QSPI synchronous read operation hangs when FIFO is not full
| -rw-r--r-- | embassy-stm32/src/qspi/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/qspi/mod.rs b/embassy-stm32/src/qspi/mod.rs index 0c65d0556..3d5b31815 100644 --- a/embassy-stm32/src/qspi/mod.rs +++ b/embassy-stm32/src/qspi/mod.rs | |||
| @@ -172,7 +172,7 @@ impl<'d, T: Instance, M: PeriMode> Qspi<'d, T, M> { | |||
| 172 | }); | 172 | }); |
| 173 | 173 | ||
| 174 | for b in buf { | 174 | for b in buf { |
| 175 | while !T::REGS.sr().read().tcf() && !T::REGS.sr().read().ftf() {} | 175 | while !T::REGS.sr().read().tcf() && (T::REGS.sr().read().flevel() == 0) {} |
| 176 | *b = unsafe { (T::REGS.dr().as_ptr() as *mut u8).read_volatile() }; | 176 | *b = unsafe { (T::REGS.dr().as_ptr() as *mut u8).read_volatile() }; |
| 177 | } | 177 | } |
| 178 | 178 | ||
