aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/rcc/bd.rs17
1 files changed, 12 insertions, 5 deletions
diff --git a/embassy-stm32/src/rcc/bd.rs b/embassy-stm32/src/rcc/bd.rs
index d20f58185..cb10a9a3f 100644
--- a/embassy-stm32/src/rcc/bd.rs
+++ b/embassy-stm32/src/rcc/bd.rs
@@ -201,11 +201,18 @@ impl LsConfig {
201 bdcr().modify(|w| w.set_bdrst(true)); 201 bdcr().modify(|w| w.set_bdrst(true));
202 bdcr().modify(|w| w.set_bdrst(false)); 202 bdcr().modify(|w| w.set_bdrst(false));
203 } 203 }
204 #[cfg(any(stm32h5))] 204 // H5 has a terrible, terrible errata: 'SRAM2 is erased when the backup domain is reset'
205 { 205 // pending a more sane sane way to handle this, just don't reset BD for now.
206 bdcr().modify(|w| w.set_vswrst(true)); 206 // This means the RTCSEL write below will have no effect, only if it has already been written
207 bdcr().modify(|w| w.set_vswrst(false)); 207 // after last power-on. Since it's uncommon to dynamically change RTCSEL, this is better than
208 } 208 // letting half our RAM go magically *poof*.
209 // STM32H503CB/EB/KB/RB device errata - 2.2.8 SRAM2 unduly erased upon a backup domain reset
210 // STM32H562xx/563xx/573xx device errata - 2.2.14 SRAM2 is erased when the backup domain is reset
211 //#[cfg(any(stm32h5))]
212 //{
213 // bdcr().modify(|w| w.set_vswrst(true));
214 // bdcr().modify(|w| w.set_vswrst(false));
215 //}
209 #[cfg(any(stm32c0))] 216 #[cfg(any(stm32c0))]
210 { 217 {
211 bdcr().modify(|w| w.set_rtcrst(true)); 218 bdcr().modify(|w| w.set_rtcrst(true));