We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9b24f4 commit 10a06a6Copy full SHA for 10a06a6
src/flash.rs
@@ -146,6 +146,13 @@ impl<'a> FlashWriter<'a> {
146
// Start Operation
147
self.flash.cr.cr().modify(|_, w| w.strt().set_bit());
148
149
+ // Wait for at least one clock cycle before reading the
150
+ // BSY bit, because there is a one-cycle delay between
151
+ // setting the STRT bit and the BSY bit being asserted
152
+ // by hardware. See STM32F105xx, STM32F107xx device errata,
153
+ // section 2.2.8
154
+ cortex_m::asm::nop();
155
+
156
// Wait for operation to finish
157
while self.flash.sr.sr().read().bsy().bit_is_set() {}
158
0 commit comments