From 6c9345a022dfd4a4dac5005166789792dffbbbe7 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 18 Dec 2025 08:57:15 -0800 Subject: [MCXA] reset_reason: process multiple bits After testing with the pending watchdog driver, I noticed that more than one bit got set (Warm and Wdog0), changing my original assumption of this register being one-hot. Update the `reset_reason()` function and example according to James Munns' MCXA DMA Error implementation. --- examples/mcxa/src/bin/reset-reason.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/mcxa/src') diff --git a/examples/mcxa/src/bin/reset-reason.rs b/examples/mcxa/src/bin/reset-reason.rs index c244fbe04..2d48a92b1 100644 --- a/examples/mcxa/src/bin/reset-reason.rs +++ b/examples/mcxa/src/bin/reset-reason.rs @@ -11,5 +11,7 @@ async fn main(_spawner: Spawner) { let config = Config::default(); let _p = hal::init(config); - defmt::info!("Reset Reason: '{}'", reset_reason()); + for reason in reset_reason().into_iter() { + defmt::info!("Reset Reason: '{}'", reason); + } } -- cgit