From 1d08cde6e45c900fad970d07529296f9850c3dff Mon Sep 17 00:00:00 2001 From: nerwalt Date: Fri, 8 Aug 2025 11:03:36 -0600 Subject: Fixes broken NS build --- embassy-nrf/src/chips/nrf54l15_app.rs | 6 ++++++ examples/nrf54l15/src/bin/wdt.rs | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/embassy-nrf/src/chips/nrf54l15_app.rs b/embassy-nrf/src/chips/nrf54l15_app.rs index f8d1befd7..9893cbd13 100644 --- a/embassy-nrf/src/chips/nrf54l15_app.rs +++ b/embassy-nrf/src/chips/nrf54l15_app.rs @@ -205,6 +205,9 @@ pub const EASY_DMA_SIZE: usize = (1 << 16) - 1; embassy_hal_internal::peripherals! { // WDT + #[cfg(feature = "_ns")] + WDT, + #[cfg(feature = "_s")] WDT0, #[cfg(feature = "_s")] WDT1, @@ -290,6 +293,9 @@ impl_pin!(P2_08, 2, 8); impl_pin!(P2_09, 2, 9); impl_pin!(P2_10, 2, 10); +#[cfg(feature = "_ns")] +impl_wdt!(WDT, WDT31, WDT31, 0); +#[cfg(feature = "_s")] impl_wdt!(WDT0, WDT31, WDT31, 0); #[cfg(feature = "_s")] impl_wdt!(WDT1, WDT30, WDT30, 1); diff --git a/examples/nrf54l15/src/bin/wdt.rs b/examples/nrf54l15/src/bin/wdt.rs index 28856dad4..9fe37d080 100644 --- a/examples/nrf54l15/src/bin/wdt.rs +++ b/examples/nrf54l15/src/bin/wdt.rs @@ -21,8 +21,9 @@ async fn main(_spawner: Spawner) { // in the WDT interrupt. The core resets 2 ticks after firing the interrupt. config.action_during_debug_halt = HaltConfig::PAUSE; - // The nrf54l15 has two watchdogs. Only WDT0 is available in non-secure (ns) mode, as WDT1 is - // reserved for the secure (s) environment. In secure mode, both WDT0 and WDT1 are available. + // The nrf54l15 has two watchdogs. Only one (WDT) is available in non-secure (ns) mode, as the + // other is reserved for the secure (s) environment. In secure mode, both are available as WDT0 + // and WDT1. info!("Watchdog launched with {} s timeout", TIMEOUT_S); let (_wdt, [mut handle]) = match Watchdog::try_new(p.WDT1, config) { Ok(x) => x, -- cgit