Skip to content

Commit bac7b62

Browse files
committed
Remove DBGMCU register modification from button example which is set automatically by probe-rs
1 parent 6abbaef commit bac7b62

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

examples/button.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,9 @@ fn main() -> ! {
5252

5353
let mut dp = stm32::Peripherals::take().expect("cannot take peripherals");
5454

55-
// Workaround for RTT when using wfi instruction
56-
// Enable the debug sleep bits in DBGMCU,
57-
// then enable DMA peripheral clock in AHB1ENR
58-
dp.DBGMCU.cr().modify(|_, w| {
59-
w.dbg_sleep().set_bit();
60-
w.dbg_stop().set_bit();
61-
w.dbg_standby().set_bit()
62-
});
63-
6455
let mut rcc = dp.RCC.constrain();
6556

57+
// Workaround for RTT when using wfi instruction
6658
// Enable an AHB peripheral clock for debug probe with wfi
6759
rcc.ahb1enr().modify(|_, w| w.dma1en().set_bit());
6860

0 commit comments

Comments
 (0)