diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs index c487b759f..abc625835 100644 --- a/embassy-stm32/src/rng.rs +++ b/embassy-stm32/src/rng.rs @@ -32,6 +32,11 @@ impl<'d, T: Instance> Rng<'d, T> { } pub fn reset(&mut self) { + //stm32wl gets stuck if there is a seed error + #[cfg(stm32wl)] + if unsafe { T::regs().sr().read().seis()} { + T::reset(); + } unsafe { T::regs().cr().modify(|reg| { reg.set_rngen(true);