stm32f0: Enable debug access in low power modes

This commit is contained in:
Timo Kröger
2021-07-29 15:24:42 +02:00
parent 01e0a3928f
commit 2a4890165d
3 changed files with 12 additions and 8 deletions

View File

@ -2,7 +2,8 @@ use core::marker::PhantomData;
use embassy::util::Unborrow;
use crate::pac::{DBGMCU, FLASH, RCC};
use crate::dbgmcu::Dbgmcu;
use crate::pac::{FLASH, RCC};
use crate::peripherals;
use crate::time::Hertz;
@ -193,12 +194,7 @@ impl<'d> Rcc<'d> {
if self.config.enable_debug_wfe {
RCC.ahbenr().modify(|w| w.set_dmaen(true));
critical_section::with(|_| {
DBGMCU.cr().modify(|w| {
w.set_dbg_standby(true);
w.set_dbg_stop(true);
});
});
critical_section::with(|_| Dbgmcu::enable_all());
}
}