feature-gate errata workaround for h7

This commit is contained in:
JuliDi 2023-09-10 11:05:10 +02:00
parent 8c13126cff
commit 6ea5aa347d
No known key found for this signature in database
GPG Key ID: E1E90AE563D09D63

View File

@ -183,14 +183,17 @@ impl<'d, T: Instance, Dma> Qspi<'d, T, Dma> {
while T::REGS.sr().read().busy() {} while T::REGS.sr().read().busy() {}
// Apply precautionary steps according to the errata... #[cfg(stm32h7)]
T::REGS.cr().write_value(Cr(0)); {
while T::REGS.sr().read().busy() {} // Apply precautionary steps according to the errata...
T::REGS.cr().write_value(Cr(0xFF000001)); T::REGS.cr().write_value(Cr(0));
T::REGS.ccr().write(|w| w.set_frcm(true)); while T::REGS.sr().read().busy() {}
T::REGS.ccr().write(|w| w.set_frcm(true)); T::REGS.cr().write_value(Cr(0xFF000001));
T::REGS.cr().write_value(Cr(0)); T::REGS.ccr().write(|w| w.set_frcm(true));
while T::REGS.sr().read().busy() {} T::REGS.ccr().write(|w| w.set_frcm(true));
T::REGS.cr().write_value(Cr(0));
while T::REGS.sr().read().busy() {}
}
T::REGS.cr().modify(|w| { T::REGS.cr().modify(|w| {
w.set_en(true); w.set_en(true);