diff options
| author | Ulf Lilleengen <[email protected]> | 2025-10-14 19:13:08 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-14 19:13:08 +0000 |
| commit | 88de32c168216c98259380f76edc54ec49e1a81a (patch) | |
| tree | d2231c15218acacd141c699af79ee311d1486814 /embassy-nrf | |
| parent | 751ed8f9a026dce742831ae34b205c40b075c8bc (diff) | |
| parent | 00aaf840352adaa31136e87efd929da20eb7afec (diff) | |
Merge pull request #4759 from HaoboGu/feat/nrf54l15_rtc
Add rtc support for nRF54L
Diffstat (limited to 'embassy-nrf')
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-nrf/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf54l15_app.rs | 42 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 1 |
4 files changed, 46 insertions, 1 deletions
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index 9e8d29f67..3df7bfd4c 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 7 | 7 | ||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | |||
| 11 | - added: Add basic RTC support for nRF54L | ||
| 10 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l | 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l |
| 11 | - changed: do not panic on BufferedUarte overrun | 13 | - changed: do not panic on BufferedUarte overrun |
| 12 | 14 | ||
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 17ffaf439..28f137d5c 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -80,6 +80,8 @@ unstable-pac = [] | |||
| 80 | gpiote = [] | 80 | gpiote = [] |
| 81 | 81 | ||
| 82 | ## Use RTC1 as the time driver for `embassy-time`, with a tick rate of 32.768khz | 82 | ## Use RTC1 as the time driver for `embassy-time`, with a tick rate of 32.768khz |
| 83 | ## | ||
| 84 | ## Note: For nRF54L, it's actually RTC30 | ||
| 83 | time-driver-rtc1 = ["_time-driver"] | 85 | time-driver-rtc1 = ["_time-driver"] |
| 84 | 86 | ||
| 85 | ## Enable embassy-net 802.15.4 driver | 87 | ## Enable embassy-net 802.15.4 driver |
diff --git a/embassy-nrf/src/chips/nrf54l15_app.rs b/embassy-nrf/src/chips/nrf54l15_app.rs index 82d30104f..901c5e7fc 100644 --- a/embassy-nrf/src/chips/nrf54l15_app.rs +++ b/embassy-nrf/src/chips/nrf54l15_app.rs | |||
| @@ -249,6 +249,45 @@ embassy_hal_internal::peripherals! { | |||
| 249 | P2_09, | 249 | P2_09, |
| 250 | P2_10, | 250 | P2_10, |
| 251 | 251 | ||
| 252 | // RTC | ||
| 253 | RTC10, | ||
| 254 | RTC30, | ||
| 255 | |||
| 256 | // SERIAL | ||
| 257 | SERIAL00, | ||
| 258 | SERIAL20, | ||
| 259 | SERIAL21, | ||
| 260 | SERIAL22, | ||
| 261 | SERIAL30, | ||
| 262 | |||
| 263 | // SAADC | ||
| 264 | SAADC, | ||
| 265 | |||
| 266 | // RADIO | ||
| 267 | RADIO, | ||
| 268 | |||
| 269 | // TIMER | ||
| 270 | TIMER00, | ||
| 271 | TIMER10, | ||
| 272 | TIMER20, | ||
| 273 | |||
| 274 | // PPI BRIDGE | ||
| 275 | PPIB00, | ||
| 276 | PPIB01, | ||
| 277 | PPIB10, | ||
| 278 | PPIB11, | ||
| 279 | PPIB20, | ||
| 280 | PPIB21, | ||
| 281 | PPIB22, | ||
| 282 | PPIB30, | ||
| 283 | |||
| 284 | // GPIOTE | ||
| 285 | GPIOTE20, | ||
| 286 | GPIOTE30, | ||
| 287 | |||
| 288 | // CRACEN | ||
| 289 | CRACEN, | ||
| 290 | |||
| 252 | #[cfg(feature = "_s")] | 291 | #[cfg(feature = "_s")] |
| 253 | // RRAMC | 292 | // RRAMC |
| 254 | RRAMC, | 293 | RRAMC, |
| @@ -303,6 +342,9 @@ impl_pin!(P2_08, 2, 8); | |||
| 303 | impl_pin!(P2_09, 2, 9); | 342 | impl_pin!(P2_09, 2, 9); |
| 304 | impl_pin!(P2_10, 2, 10); | 343 | impl_pin!(P2_10, 2, 10); |
| 305 | 344 | ||
| 345 | impl_rtc!(RTC10, RTC10, RTC10); | ||
| 346 | impl_rtc!(RTC30, RTC30, RTC30); | ||
| 347 | |||
| 306 | #[cfg(feature = "_ns")] | 348 | #[cfg(feature = "_ns")] |
| 307 | impl_wdt!(WDT, WDT31, WDT31, 0); | 349 | impl_wdt!(WDT, WDT31, WDT31, 0); |
| 308 | #[cfg(feature = "_s")] | 350 | #[cfg(feature = "_s")] |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 1b7fb7e7f..705c77453 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -155,7 +155,6 @@ pub mod reset; | |||
| 155 | #[cfg(not(feature = "_nrf54l"))] // TODO | 155 | #[cfg(not(feature = "_nrf54l"))] // TODO |
| 156 | #[cfg(not(any(feature = "_nrf5340-app", feature = "_nrf91")))] | 156 | #[cfg(not(any(feature = "_nrf5340-app", feature = "_nrf91")))] |
| 157 | pub mod rng; | 157 | pub mod rng; |
| 158 | #[cfg(not(feature = "_nrf54l"))] // TODO | ||
| 159 | pub mod rtc; | 158 | pub mod rtc; |
| 160 | #[cfg(not(feature = "_nrf54l"))] // TODO | 159 | #[cfg(not(feature = "_nrf54l"))] // TODO |
| 161 | #[cfg(not(any(feature = "_nrf51", feature = "nrf52820", feature = "_nrf5340-net")))] | 160 | #[cfg(not(any(feature = "_nrf51", feature = "nrf52820", feature = "_nrf5340-net")))] |
