embassy-stm32: wait for BSY flag to clear before flashing

While not waiting for the BSY flag to clear works on STM32F103C8T6, it
does not on APM32F103C8T6. Only one half-word gets written while the
other one gets lost.
This commit is contained in:
Samuel Tardieu 2024-07-27 15:04:02 +02:00
parent b88dc137e7
commit 8680c86894

View File

@ -42,9 +42,11 @@ pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE])
// prevents parallelism errors
fence(Ordering::SeqCst);
wait_ready_blocking()?;
}
wait_ready_blocking()
Ok(())
}
pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> {