644: stm32 misc fixes r=Dirbaio a=Dirbaio

- Fix build when no DBGMCU is present (wl55 cm0 core)
- Fix multicore 2nd core having the wrong NVIC.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
This commit is contained in:
bors[bot] 2022-02-25 00:47:12 +00:00 committed by GitHub
commit 6da4b66364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -76,6 +76,7 @@ pub use generated::{peripherals, Peripherals};
#[non_exhaustive]
pub struct Config {
pub rcc: rcc::Config,
#[cfg(dbgmcu)]
pub enable_debug_during_sleep: bool,
}
@ -83,6 +84,7 @@ impl Default for Config {
fn default() -> Self {
Self {
rcc: Default::default(),
#[cfg(dbgmcu)]
enable_debug_during_sleep: true,
}
}
@ -93,6 +95,7 @@ pub fn init(config: Config) -> Peripherals {
let p = Peripherals::take();
unsafe {
#[cfg(dbgmcu)]
if config.enable_debug_during_sleep {
crate::pac::DBGMCU.cr().modify(|cr| {
crate::pac::dbgmcu! {

@ -1 +1 @@
Subproject commit cb78ac90ba8607d6bb38296607c02e28c60391f8
Subproject commit 5fcc7795c880c7b19bb7b6226cd6d7db0b5cd953