-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
At embedded world this year I got a NUCLEO-WBA64RI and finally got to trying to do something with it. Ideally, using the default config would "just work", even if the clocks are at their lowest values, and most of the peripherals are still disabled.
I have my project here: https://github.com/0x53A/stm_nfc_board_test
#![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) -> ! {
let config = Config::default();
let _p = embassy_stm32::init(config);
loop {
info!("Hello World!");
Timer::after_secs(1).await;
}
}Trying to flash it with cargo run --release results in:
lukas@nixos ~/s/stm_nfc_board_test (main)> cargo run --release
Compiling stm_nfc_board_test v0.1.0 (/home/lukas/src/stm_nfc_board_test)
Finished `release` profile [optimized + debuginfo] target(s) in 0.39s
Running `probe-rs run --chip STM32WBA65RI target/thumbv7em-none-eabihf/release/stm_nfc_board_test`
Erasing ✔ 100% [####################] 24.00 KiB @ 266.00 KiB/s (took 0s)
Programming ✔ 100% [####################] 19.00 KiB @ 41.99 KiB/s (took 0s) Finished in 0.65s
0.000000 [TRACE] BDCR ok: 0c002208 (embassy_stm32 src/rcc/bd.rs:221)
0.000000 [ERROR] panicked at /home/lukas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-stm32-0.4.0/src/rcc/wba.rs:261:40:
PLL1.P not configured (panic_probe panic-probe-1.0.0/src/lib.rs:104)
Firmware exited unexpectedly: Exception
WARN probe_rs_debug::debug_info: UNWIND: Error while checking for exception context. The stack trace will not include the calling frames. : Probe(Register("No Stack Pointer register. Please report this as a bug."))
Core 0
Frame 0: HardFault_ @ 0x080040fa
/home/lukas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cortex-m-rt-0.7.5/src/lib.rs:1103:1
Frame 1: UNWIND: Error while checking for exception context. The stack trace will not include the calling frames. : Probe(Register("No Stack Pointer register. Please report this as a bug.")) @ 0x080040fa
Error: Exception
I've verified that the same error happens if I use the current main branch from github.
The offending code block is
#[cfg(sai_v4_2pdm)]
let audioclk = match config.mux.sai1sel {
Sai1sel::HSI => Some(HSI_FREQ),
Sai1sel::PLL1_Q => Some(pll1.q.expect("PLL1.Q not configured")),
Sai1sel::PLL1_P => Some(pll1.p.expect("PLL1.P not configured")),
Sai1sel::SYS => panic!("SYS not supported yet"),
Sai1sel::AUDIOCLK => panic!("AUDIOCLK not supported yet"),
_ => None,
};To a certain degree, this doesn't really matter, because as soon as you want to do anything actually useful with the chip, you'll have to configure clocks manually instead of using defaults, anyway.
Metadata
Metadata
Assignees
Labels
No labels