Skip to content

Commit

Permalink
Add debugger asm::wfi workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh3Rm4n committed May 25, 2021
1 parent 7a4cfcf commit ff13865
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/serial_dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ fn main() -> ! {
let dp = pac::Peripherals::take().unwrap();

let mut flash = dp.FLASH.constrain();

// https://github.com/probe-rs/probe-rs/issues/350#issuecomment-740550519
dp.DBGMCU.cr.modify(|_, w| {
w.dbg_sleep().set_bit();
w.dbg_standby().set_bit();
w.dbg_stop().set_bit()
});
dp.RCC.ahbenr.modify(|_, w| w.dma1en().enabled());

let mut rcc = dp.RCC.constrain();
let clocks = rcc.cfgr.freeze(&mut flash.acr);

Expand Down

0 comments on commit ff13865

Please sign in to comment.