Skip to content

Commit ff13865

Browse files
committed
Add debugger asm::wfi workaround
1 parent 7a4cfcf commit ff13865

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/serial_dma.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ fn main() -> ! {
2121
let dp = pac::Peripherals::take().unwrap();
2222

2323
let mut flash = dp.FLASH.constrain();
24+
25+
// https://github.com/probe-rs/probe-rs/issues/350#issuecomment-740550519
26+
dp.DBGMCU.cr.modify(|_, w| {
27+
w.dbg_sleep().set_bit();
28+
w.dbg_standby().set_bit();
29+
w.dbg_stop().set_bit()
30+
});
31+
dp.RCC.ahbenr.modify(|_, w| w.dma1en().enabled());
32+
2433
let mut rcc = dp.RCC.constrain();
2534
let clocks = rcc.cfgr.freeze(&mut flash.acr);
2635

0 commit comments

Comments
 (0)