You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
427: Fix flash write error, according to errata r=burrbull a=datdenkikniet
According to the [errata](https://www.st.com/resource/en/errata_sheet/es096-stm32f101x8b-stm32f102x8b-and-stm32f103x8b-mediumdensity-device-limitations-stmicroelectronics.pdf) for stm32f1, section 2.2.8, reading `BSY` after writing `STRT` needs a 1-cycle delay to be read correctly.
It took a while for us to hit an issue with this (presumably due to eventual optimization by the compiler). Once you hit it, the chip just hangs, as the `while` loop that waits for `BSY` to be cleared immediately completes, which causes the page erase and lock bits are reset while an erase operation is still ongoing, which is probably not good.
Co-authored-by: Johannes Draaijer <johannes.draaijer@mobilaris.se>
0 commit comments