hack for STM32WL, rcc reset in case of seed error
The STM32WL series has a more complicated rng device that gets stuck when there is a seed error.
This commit is contained in:
parent
da6b1e8399
commit
bab4277a86
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue