Add examples for STM32L0

This commit is contained in:
Ulf Lilleengen
2021-06-09 15:22:52 +02:00
committed by Dario Nieuwenhuis
parent 3d16e922d5
commit 1bb7123156
11 changed files with 300 additions and 3 deletions

View File

@ -263,9 +263,7 @@ impl<'d> Rcc<'d> {
pub fn enable_debug_wfe(&mut self, _dbg: &mut peripherals::DBGMCU, enable_dma: bool) {
// NOTE(unsafe) We have exclusive access to the RCC and DBGMCU
unsafe {
if enable_dma {
pac::RCC.ahbenr().modify(|w| w.set_dmaen(true));
}
pac::RCC.ahbenr().modify(|w| w.set_dmaen(enable_dma));
pac::DBGMCU.cr().modify(|w| {
w.set_dbg_sleep(DbgSleep::ENABLED);