diff options
| -rw-r--r-- | embassy-nrf/src/chips/nrf54l15_app.rs | 6 | ||||
| -rw-r--r-- | 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; | |||
| 205 | 205 | ||
| 206 | embassy_hal_internal::peripherals! { | 206 | embassy_hal_internal::peripherals! { |
| 207 | // WDT | 207 | // WDT |
| 208 | #[cfg(feature = "_ns")] | ||
| 209 | WDT, | ||
| 210 | #[cfg(feature = "_s")] | ||
| 208 | WDT0, | 211 | WDT0, |
| 209 | #[cfg(feature = "_s")] | 212 | #[cfg(feature = "_s")] |
| 210 | WDT1, | 213 | WDT1, |
| @@ -290,6 +293,9 @@ impl_pin!(P2_08, 2, 8); | |||
| 290 | impl_pin!(P2_09, 2, 9); | 293 | impl_pin!(P2_09, 2, 9); |
| 291 | impl_pin!(P2_10, 2, 10); | 294 | impl_pin!(P2_10, 2, 10); |
| 292 | 295 | ||
| 296 | #[cfg(feature = "_ns")] | ||
| 297 | impl_wdt!(WDT, WDT31, WDT31, 0); | ||
| 298 | #[cfg(feature = "_s")] | ||
| 293 | impl_wdt!(WDT0, WDT31, WDT31, 0); | 299 | impl_wdt!(WDT0, WDT31, WDT31, 0); |
| 294 | #[cfg(feature = "_s")] | 300 | #[cfg(feature = "_s")] |
| 295 | impl_wdt!(WDT1, WDT30, WDT30, 1); | 301 | 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) { | |||
| 21 | // in the WDT interrupt. The core resets 2 ticks after firing the interrupt. | 21 | // in the WDT interrupt. The core resets 2 ticks after firing the interrupt. |
| 22 | config.action_during_debug_halt = HaltConfig::PAUSE; | 22 | config.action_during_debug_halt = HaltConfig::PAUSE; |
| 23 | 23 | ||
| 24 | // The nrf54l15 has two watchdogs. Only WDT0 is available in non-secure (ns) mode, as WDT1 is | 24 | // The nrf54l15 has two watchdogs. Only one (WDT) is available in non-secure (ns) mode, as the |
| 25 | // reserved for the secure (s) environment. In secure mode, both WDT0 and WDT1 are available. | 25 | // other is reserved for the secure (s) environment. In secure mode, both are available as WDT0 |
| 26 | // and WDT1. | ||
| 26 | info!("Watchdog launched with {} s timeout", TIMEOUT_S); | 27 | info!("Watchdog launched with {} s timeout", TIMEOUT_S); |
| 27 | let (_wdt, [mut handle]) = match Watchdog::try_new(p.WDT1, config) { | 28 | let (_wdt, [mut handle]) = match Watchdog::try_new(p.WDT1, config) { |
| 28 | Ok(x) => x, | 29 | Ok(x) => x, |
