mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 16:23:10 +00:00
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
@ -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 New Issue
Block a user