diff options
| author | Elias Hanelt <[email protected]> | 2025-11-28 12:05:22 -0800 |
|---|---|---|
| committer | Elias Hanelt <[email protected]> | 2025-11-28 12:05:22 -0800 |
| commit | d6bf4a2647e425ed045b4972a332bec397564b5d (patch) | |
| tree | fb054bf47c3d4582d5606ad688db219b80d925a0 | |
| parent | 006a0873d8efb9620841759f2c15450dc9ae044e (diff) | |
| parent | 217b683427687e8f3a27f02852e6f5bd2405ace3 (diff) | |
Merge remote-tracking branch 'origin/main' into i2c-slave/fix-early-term
| -rw-r--r-- | cyw43-pio/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | cyw43-pio/Cargo.toml | 6 | ||||
| -rw-r--r-- | cyw43/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | cyw43/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-boot-rp/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-boot-rp/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-net-nrf91/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-nrf/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-nrf/Cargo.toml | 18 | ||||
| -rw-r--r-- | embassy-nrf/src/chips/nrf54l15_app.rs | 27 | ||||
| -rw-r--r-- | embassy-nrf/src/lib.rs | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/saadc.rs | 10 | ||||
| -rw-r--r-- | embassy-nrf/src/time_driver.rs | 152 | ||||
| -rw-r--r-- | embassy-rp/CHANGELOG.md | 2 | ||||
| -rw-r--r-- | embassy-rp/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-stm32/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/can/enums.rs | 37 | ||||
| -rw-r--r-- | embassy-stm32/src/can/util.rs | 33 | ||||
| -rw-r--r-- | examples/boot/application/rp/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/nrf54l15/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/nrf54l15/src/bin/rtc.rs | 56 | ||||
| -rw-r--r-- | examples/nrf54l15/src/bin/timer.rs | 30 | ||||
| -rw-r--r-- | examples/rp/Cargo.toml | 6 | ||||
| -rw-r--r-- | examples/rp235x/Cargo.toml | 6 | ||||
| -rw-r--r-- | tests/rp/Cargo.toml | 2 |
25 files changed, 263 insertions, 148 deletions
diff --git a/cyw43-pio/CHANGELOG.md b/cyw43-pio/CHANGELOG.md index c2d18919c..80343e02e 100644 --- a/cyw43-pio/CHANGELOG.md +++ b/cyw43-pio/CHANGELOG.md | |||
| @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | ## 0.9.0 - 2025-11-27 | ||
| 12 | |||
| 11 | - Select pio program based on core clock speed #4792 | 13 | - Select pio program based on core clock speed #4792 |
| 12 | 14 | ||
| 13 | ## 0.8.0 - 2025-08-28 | 15 | ## 0.8.0 - 2025-08-28 |
diff --git a/cyw43-pio/Cargo.toml b/cyw43-pio/Cargo.toml index a10a091e9..3001fa92b 100644 --- a/cyw43-pio/Cargo.toml +++ b/cyw43-pio/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "cyw43-pio" | 2 | name = "cyw43-pio" |
| 3 | version = "0.8.0" | 3 | version = "0.9.0" |
| 4 | edition = "2024" | 4 | edition = "2024" |
| 5 | description = "RP2040 PIO SPI implementation for cyw43" | 5 | description = "RP2040 PIO SPI implementation for cyw43" |
| 6 | keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] | 6 | keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] |
| @@ -10,8 +10,8 @@ repository = "https://github.com/embassy-rs/embassy" | |||
| 10 | documentation = "https://docs.embassy.dev/cyw43-pio" | 10 | documentation = "https://docs.embassy.dev/cyw43-pio" |
| 11 | 11 | ||
| 12 | [dependencies] | 12 | [dependencies] |
| 13 | cyw43 = { version = "0.5.0", path = "../cyw43" } | 13 | cyw43 = { version = "0.6.0", path = "../cyw43" } |
| 14 | embassy-rp = { version = "0.8.0", path = "../embassy-rp" } | 14 | embassy-rp = { version = "0.9.0", path = "../embassy-rp" } |
| 15 | fixed = "1.23.1" | 15 | fixed = "1.23.1" |
| 16 | defmt = { version = "1.0.1", optional = true } | 16 | defmt = { version = "1.0.1", optional = true } |
| 17 | 17 | ||
diff --git a/cyw43/CHANGELOG.md b/cyw43/CHANGELOG.md index 1045fd30b..9fe341357 100644 --- a/cyw43/CHANGELOG.md +++ b/cyw43/CHANGELOG.md | |||
| @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | ## 0.6.0 - 2025-11-27 | ||
| 12 | |||
| 11 | - Updated documentation for Control::join() #4678 | 13 | - Updated documentation for Control::join() #4678 |
| 12 | - Bump bt-hci to 0.6.0. | 14 | - Bump bt-hci to 0.6.0. |
| 13 | - Add error handling to HCI transport implementation. | 15 | - Add error handling to HCI transport implementation. |
diff --git a/cyw43/Cargo.toml b/cyw43/Cargo.toml index 314427611..6d7647697 100644 --- a/cyw43/Cargo.toml +++ b/cyw43/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "cyw43" | 2 | name = "cyw43" |
| 3 | version = "0.5.0" | 3 | version = "0.6.0" |
| 4 | edition = "2024" | 4 | edition = "2024" |
| 5 | description = "Rust driver for the CYW43439 WiFi chip, used in the Raspberry Pi Pico W." | 5 | description = "Rust driver for the CYW43439 WiFi chip, used in the Raspberry Pi Pico W." |
| 6 | keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] | 6 | keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] |
diff --git a/embassy-boot-rp/CHANGELOG.md b/embassy-boot-rp/CHANGELOG.md index 8cc1e73c0..068075b5c 100644 --- a/embassy-boot-rp/CHANGELOG.md +++ b/embassy-boot-rp/CHANGELOG.md | |||
| @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | ## 0.9.0 - 2025-11-27 | ||
| 12 | |||
| 11 | ## 0.8.0 - 2025-08-26 | 13 | ## 0.8.0 - 2025-08-26 |
| 12 | 14 | ||
| 13 | ## 0.1.1 - 2025-08-15 | 15 | ## 0.1.1 - 2025-08-15 |
diff --git a/embassy-boot-rp/Cargo.toml b/embassy-boot-rp/Cargo.toml index e80c79374..2f63dea4c 100644 --- a/embassy-boot-rp/Cargo.toml +++ b/embassy-boot-rp/Cargo.toml | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | edition = "2024" | 2 | edition = "2024" |
| 3 | name = "embassy-boot-rp" | 3 | name = "embassy-boot-rp" |
| 4 | version = "0.8.0" | 4 | version = "0.9.0" |
| 5 | description = "Bootloader lib for RP2040 chips" | 5 | description = "Bootloader lib for RP2040 chips" |
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | repository = "https://github.com/embassy-rs/embassy" | 7 | repository = "https://github.com/embassy-rs/embassy" |
| @@ -31,7 +31,7 @@ defmt = { version = "1.0.1", optional = true } | |||
| 31 | log = { version = "0.4", optional = true } | 31 | log = { version = "0.4", optional = true } |
| 32 | 32 | ||
| 33 | embassy-sync = { version = "0.7.2", path = "../embassy-sync" } | 33 | embassy-sync = { version = "0.7.2", path = "../embassy-sync" } |
| 34 | embassy-rp = { version = "0.8.0", path = "../embassy-rp", default-features = false } | 34 | embassy-rp = { version = "0.9.0", path = "../embassy-rp", default-features = false } |
| 35 | embassy-boot = { version = "0.6.1", path = "../embassy-boot" } | 35 | embassy-boot = { version = "0.6.1", path = "../embassy-boot" } |
| 36 | embassy-time = { version = "0.5.0", path = "../embassy-time" } | 36 | embassy-time = { version = "0.5.0", path = "../embassy-time" } |
| 37 | 37 | ||
diff --git a/embassy-net-nrf91/Cargo.toml b/embassy-net-nrf91/Cargo.toml index 75b7aeeb2..8cf11f1fb 100644 --- a/embassy-net-nrf91/Cargo.toml +++ b/embassy-net-nrf91/Cargo.toml | |||
| @@ -18,7 +18,7 @@ log = ["dep:log"] | |||
| 18 | defmt = { version = "1.0.1", optional = true } | 18 | defmt = { version = "1.0.1", optional = true } |
| 19 | log = { version = "0.4.14", optional = true } | 19 | log = { version = "0.4.14", optional = true } |
| 20 | 20 | ||
| 21 | nrf-pac = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-pac.git", rev = "58198c23bce72edc10b4e1656d1b54441fc74e7c" } | 21 | nrf-pac = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-pac.git", rev = "176dc4afe1dd8df78f3cbda4479ab5151aa32252" } |
| 22 | cortex-m = "0.7.7" | 22 | cortex-m = "0.7.7" |
| 23 | 23 | ||
| 24 | embassy-time = { version = "0.5.0", path = "../embassy-time" } | 24 | embassy-time = { version = "0.5.0", path = "../embassy-time" } |
diff --git a/embassy-nrf/CHANGELOG.md b/embassy-nrf/CHANGELOG.md index cfb040ef5..5657ddcfb 100644 --- a/embassy-nrf/CHANGELOG.md +++ b/embassy-nrf/CHANGELOG.md | |||
| @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | - added: Add basic RTC support for nRF54L | ||
| 12 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l | 11 | - changed: apply trimming values from FICR.TRIMCNF on nrf53/54l |
| 13 | - changed: do not panic on BufferedUarte overrun | 12 | - changed: do not panic on BufferedUarte overrun |
| 14 | - added: allow direct access to the input pin of `gpiote::InputChannel` | 13 | - added: allow direct access to the input pin of `gpiote::InputChannel` |
| @@ -29,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 29 | - bugfix: use correct flash size for nRF54l | 28 | - bugfix: use correct flash size for nRF54l |
| 30 | - changed: add workaround for anomaly 66 on nrf52 | 29 | - changed: add workaround for anomaly 66 on nrf52 |
| 31 | - added: expose PPI events available on SPIS peripheral | 30 | - added: expose PPI events available on SPIS peripheral |
| 31 | - added: add basic GRTC time driver support for nRF54L | ||
| 32 | 32 | ||
| 33 | ## 0.8.0 - 2025-09-30 | 33 | ## 0.8.0 - 2025-09-30 |
| 34 | 34 | ||
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 08f4b280b..f73772682 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -23,8 +23,8 @@ build = [ | |||
| 23 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-app-s", "time", "time-driver-rtc1"]}, | 23 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-app-s", "time", "time-driver-rtc1"]}, |
| 24 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-app-ns", "time", "time-driver-rtc1"]}, | 24 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-app-ns", "time", "time-driver-rtc1"]}, |
| 25 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-net", "time", "time-driver-rtc1"]}, | 25 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf5340-net", "time", "time-driver-rtc1"]}, |
| 26 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf54l15-app-s", "time", "time-driver-rtc1"]}, | 26 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf54l15-app-s", "time", "time-driver-grtc"]}, |
| 27 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf54l15-app-ns", "time", "time-driver-rtc1"]}, | 27 | {target = "thumbv8m.main-none-eabihf", features = ["gpiote", "nrf54l15-app-ns", "time", "time-driver-grtc"]}, |
| 28 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time"]}, | 28 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time"]}, |
| 29 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time-driver-rtc1"]}, | 29 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time-driver-rtc1"]}, |
| 30 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time", "time-driver-rtc1"]}, | 30 | {target = "thumbv7em-none-eabi", features = ["gpiote", "nrf52840", "time", "time-driver-rtc1"]}, |
| @@ -80,9 +80,10 @@ 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 | ## | 83 | time-driver-rtc1 = ["_time-driver", "embassy-time-driver?/tick-hz-32_768"] |
| 84 | ## Note: For nRF54L, it's actually RTC30 | 84 | |
| 85 | time-driver-rtc1 = ["_time-driver"] | 85 | ## Use GRTC (CC n=1, GRTC_1 irq) as the time driver for `embassy-time`, with a tick rate of 1 MHz |
| 86 | time-driver-grtc = ["_time-driver", "embassy-time-driver?/tick-hz-1_000_000"] | ||
| 86 | 87 | ||
| 87 | ## Enable embassy-net 802.15.4 driver | 88 | ## Enable embassy-net 802.15.4 driver |
| 88 | net-driver = ["_net-driver"] | 89 | net-driver = ["_net-driver"] |
| @@ -152,7 +153,7 @@ _nrf5340-net = ["_nrf5340", "nrf-pac/nrf5340-net"] | |||
| 152 | _nrf5340 = ["_gpio-p1", "_dppi"] | 153 | _nrf5340 = ["_gpio-p1", "_dppi"] |
| 153 | _nrf54l15-app = ["_nrf54l15", "nrf-pac/nrf54l15-app"] | 154 | _nrf54l15-app = ["_nrf54l15", "nrf-pac/nrf54l15-app"] |
| 154 | _nrf54l15 = ["_nrf54l", "_gpio-p1", "_gpio-p2"] | 155 | _nrf54l15 = ["_nrf54l", "_gpio-p1", "_gpio-p2"] |
| 155 | _nrf54l = ["_dppi"] | 156 | _nrf54l = ["_dppi", "_grtc"] |
| 156 | 157 | ||
| 157 | _nrf9160 = ["nrf-pac/nrf9160", "_dppi", "_spi-v1"] | 158 | _nrf9160 = ["nrf-pac/nrf9160", "_dppi", "_spi-v1"] |
| 158 | _nrf9120 = ["nrf-pac/nrf9120", "_dppi", "_spi-v1"] | 159 | _nrf9120 = ["nrf-pac/nrf9120", "_dppi", "_spi-v1"] |
| @@ -160,7 +161,7 @@ _nrf52 = ["_ppi"] | |||
| 160 | _nrf51 = ["_ppi", "_spi-v1"] | 161 | _nrf51 = ["_ppi", "_spi-v1"] |
| 161 | _nrf91 = [] | 162 | _nrf91 = [] |
| 162 | 163 | ||
| 163 | _time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-utils", "embassy-embedded-hal/time"] | 164 | _time-driver = ["dep:embassy-time-driver", "dep:embassy-time-queue-utils", "embassy-embedded-hal/time"] |
| 164 | 165 | ||
| 165 | _net-driver = ["dep:embassy-net-driver-channel","dep:embassy-futures"] | 166 | _net-driver = ["dep:embassy-net-driver-channel","dep:embassy-futures"] |
| 166 | 167 | ||
| @@ -173,6 +174,7 @@ _dppi = [] | |||
| 173 | _gpio-p1 = [] | 174 | _gpio-p1 = [] |
| 174 | _gpio-p2 = [] | 175 | _gpio-p2 = [] |
| 175 | _spi-v1 = [] | 176 | _spi-v1 = [] |
| 177 | _grtc = [] | ||
| 176 | 178 | ||
| 177 | # Errata workarounds | 179 | # Errata workarounds |
| 178 | _nrf52832_anomaly_109 = [] | 180 | _nrf52832_anomaly_109 = [] |
| @@ -200,7 +202,7 @@ embedded-io-async = { version = "0.6.1" } | |||
| 200 | rand-core-06 = { package = "rand_core", version = "0.6" } | 202 | rand-core-06 = { package = "rand_core", version = "0.6" } |
| 201 | rand-core-09 = { package = "rand_core", version = "0.9" } | 203 | rand-core-09 = { package = "rand_core", version = "0.9" } |
| 202 | 204 | ||
| 203 | nrf-pac = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-pac.git", rev = "58198c23bce72edc10b4e1656d1b54441fc74e7c" } | 205 | nrf-pac = { version = "0.1.0", git = "https://github.com/embassy-rs/nrf-pac.git", rev = "176dc4afe1dd8df78f3cbda4479ab5151aa32252" } |
| 204 | 206 | ||
| 205 | defmt = { version = "1.0.1", optional = true } | 207 | defmt = { version = "1.0.1", optional = true } |
| 206 | bitflags = "2.4.2" | 208 | bitflags = "2.4.2" |
diff --git a/embassy-nrf/src/chips/nrf54l15_app.rs b/embassy-nrf/src/chips/nrf54l15_app.rs index 8846717db..8e6595248 100644 --- a/embassy-nrf/src/chips/nrf54l15_app.rs +++ b/embassy-nrf/src/chips/nrf54l15_app.rs | |||
| @@ -26,7 +26,6 @@ pub mod pac { | |||
| 26 | PPIB10_NS as PPIB10, | 26 | PPIB10_NS as PPIB10, |
| 27 | PPIB11_NS as PPIB11, | 27 | PPIB11_NS as PPIB11, |
| 28 | TIMER10_NS as TIMER10, | 28 | TIMER10_NS as TIMER10, |
| 29 | RTC10_NS as RTC10, | ||
| 30 | EGU10_NS as EGU10, | 29 | EGU10_NS as EGU10, |
| 31 | RADIO_NS as RADIO, | 30 | RADIO_NS as RADIO, |
| 32 | DPPIC20_NS as DPPIC20, | 31 | DPPIC20_NS as DPPIC20, |
| @@ -76,7 +75,6 @@ pub mod pac { | |||
| 76 | TWIM30_NS as TWIM30, | 75 | TWIM30_NS as TWIM30, |
| 77 | TWIS30_NS as TWIS30, | 76 | TWIS30_NS as TWIS30, |
| 78 | UARTE30_NS as UARTE30, | 77 | UARTE30_NS as UARTE30, |
| 79 | RTC30_NS as RTC30, | ||
| 80 | COMP_NS as COMP, | 78 | COMP_NS as COMP, |
| 81 | LPCOMP_NS as LPCOMP, | 79 | LPCOMP_NS as LPCOMP, |
| 82 | WDT31_NS as WDT31, | 80 | WDT31_NS as WDT31, |
| @@ -127,7 +125,6 @@ pub mod pac { | |||
| 127 | PPIB10_S as PPIB10, | 125 | PPIB10_S as PPIB10, |
| 128 | PPIB11_S as PPIB11, | 126 | PPIB11_S as PPIB11, |
| 129 | TIMER10_S as TIMER10, | 127 | TIMER10_S as TIMER10, |
| 130 | RTC10_S as RTC10, | ||
| 131 | EGU10_S as EGU10, | 128 | EGU10_S as EGU10, |
| 132 | RADIO_S as RADIO, | 129 | RADIO_S as RADIO, |
| 133 | SPU20_S as SPU20, | 130 | SPU20_S as SPU20, |
| @@ -180,7 +177,6 @@ pub mod pac { | |||
| 180 | TWIM30_S as TWIM30, | 177 | TWIM30_S as TWIM30, |
| 181 | TWIS30_S as TWIS30, | 178 | TWIS30_S as TWIS30, |
| 182 | UARTE30_S as UARTE30, | 179 | UARTE30_S as UARTE30, |
| 183 | RTC30_S as RTC30, | ||
| 184 | COMP_S as COMP, | 180 | COMP_S as COMP, |
| 185 | LPCOMP_S as LPCOMP, | 181 | LPCOMP_S as LPCOMP, |
| 186 | WDT30_S as WDT30, | 182 | WDT30_S as WDT30, |
| @@ -417,11 +413,19 @@ embassy_hal_internal::peripherals! { | |||
| 417 | P2_10, | 413 | P2_10, |
| 418 | 414 | ||
| 419 | // GRTC | 415 | // GRTC |
| 420 | GRTC, | 416 | GRTC_CH0, |
| 421 | 417 | #[cfg(not(feature = "time-driver-grtc"))] | |
| 422 | // RTC | 418 | GRTC_CH1, |
| 423 | RTC10, | 419 | GRTC_CH2, |
| 424 | RTC30, | 420 | GRTC_CH3, |
| 421 | GRTC_CH4, | ||
| 422 | GRTC_CH5, | ||
| 423 | GRTC_CH6, | ||
| 424 | GRTC_CH7, | ||
| 425 | GRTC_CH8, | ||
| 426 | GRTC_CH9, | ||
| 427 | GRTC_CH10, | ||
| 428 | GRTC_CH11, | ||
| 425 | 429 | ||
| 426 | // PWM | 430 | // PWM |
| 427 | PWM20, | 431 | PWM20, |
| @@ -548,9 +552,6 @@ cfg_if::cfg_if! { | |||
| 548 | } | 552 | } |
| 549 | } | 553 | } |
| 550 | 554 | ||
| 551 | impl_rtc!(RTC10, RTC10, RTC10); | ||
| 552 | impl_rtc!(RTC30, RTC30, RTC30); | ||
| 553 | |||
| 554 | #[cfg(feature = "_ns")] | 555 | #[cfg(feature = "_ns")] |
| 555 | impl_wdt!(WDT, WDT31, WDT31, 0); | 556 | impl_wdt!(WDT, WDT31, WDT31, 0); |
| 556 | #[cfg(feature = "_s")] | 557 | #[cfg(feature = "_s")] |
| @@ -703,7 +704,6 @@ embassy_hal_internal::interrupt_mod!( | |||
| 703 | TIMER00, | 704 | TIMER00, |
| 704 | SPU10, | 705 | SPU10, |
| 705 | TIMER10, | 706 | TIMER10, |
| 706 | RTC10, | ||
| 707 | EGU10, | 707 | EGU10, |
| 708 | RADIO_0, | 708 | RADIO_0, |
| 709 | RADIO_1, | 709 | RADIO_1, |
| @@ -737,7 +737,6 @@ embassy_hal_internal::interrupt_mod!( | |||
| 737 | GRTC_3, | 737 | GRTC_3, |
| 738 | SPU30, | 738 | SPU30, |
| 739 | SERIAL30, | 739 | SERIAL30, |
| 740 | RTC30, | ||
| 741 | COMP_LPCOMP, | 740 | COMP_LPCOMP, |
| 742 | WDT30, | 741 | WDT30, |
| 743 | WDT31, | 742 | WDT31, |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 28d2119ae..e8762b00d 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -153,6 +153,7 @@ pub mod reset; | |||
| 153 | #[cfg(not(feature = "_nrf54l"))] | 153 | #[cfg(not(feature = "_nrf54l"))] |
| 154 | #[cfg(not(any(feature = "_nrf5340-app", feature = "_nrf91")))] | 154 | #[cfg(not(any(feature = "_nrf5340-app", feature = "_nrf91")))] |
| 155 | pub mod rng; | 155 | pub mod rng; |
| 156 | #[cfg(not(feature = "_nrf54l"))] | ||
| 156 | pub mod rtc; | 157 | pub mod rtc; |
| 157 | #[cfg(not(any(feature = "_nrf51", feature = "nrf52820", feature = "_nrf5340-net")))] | 158 | #[cfg(not(any(feature = "_nrf51", feature = "nrf52820", feature = "_nrf5340-net")))] |
| 158 | pub mod saadc; | 159 | pub mod saadc; |
diff --git a/embassy-nrf/src/saadc.rs b/embassy-nrf/src/saadc.rs index ca8cbd73e..ab0e2b86a 100644 --- a/embassy-nrf/src/saadc.rs +++ b/embassy-nrf/src/saadc.rs | |||
| @@ -771,7 +771,7 @@ pub(crate) trait SealedInput { | |||
| 771 | fn port(&self) -> u8; | 771 | fn port(&self) -> u8; |
| 772 | 772 | ||
| 773 | #[cfg(feature = "_nrf54l")] | 773 | #[cfg(feature = "_nrf54l")] |
| 774 | fn internal(&self) -> vals::Internal; | 774 | fn internal(&self) -> vals::PselpInternal; |
| 775 | 775 | ||
| 776 | #[cfg(feature = "_nrf54l")] | 776 | #[cfg(feature = "_nrf54l")] |
| 777 | fn connect(&self) -> vals::PselpConnect; | 777 | fn connect(&self) -> vals::PselpConnect; |
| @@ -832,7 +832,7 @@ pub struct AnyInput<'a> { | |||
| 832 | pub struct AnyInput<'a> { | 832 | pub struct AnyInput<'a> { |
| 833 | pin: u8, | 833 | pin: u8, |
| 834 | port: u8, | 834 | port: u8, |
| 835 | internal: vals::Internal, | 835 | internal: vals::PselpInternal, |
| 836 | connect: vals::PselpConnect, | 836 | connect: vals::PselpConnect, |
| 837 | _phantom: PhantomData<&'a ()>, | 837 | _phantom: PhantomData<&'a ()>, |
| 838 | } | 838 | } |
| @@ -881,7 +881,7 @@ impl SealedInput for AnyInput<'_> { | |||
| 881 | } | 881 | } |
| 882 | 882 | ||
| 883 | #[cfg(feature = "_nrf54l")] | 883 | #[cfg(feature = "_nrf54l")] |
| 884 | fn internal(&self) -> vals::Internal { | 884 | fn internal(&self) -> vals::PselpInternal { |
| 885 | self.internal | 885 | self.internal |
| 886 | } | 886 | } |
| 887 | 887 | ||
| @@ -923,8 +923,8 @@ macro_rules! impl_saadc_input { | |||
| 923 | $port | 923 | $port |
| 924 | } | 924 | } |
| 925 | 925 | ||
| 926 | fn internal(&self) -> crate::pac::saadc::vals::Internal { | 926 | fn internal(&self) -> crate::pac::saadc::vals::PselpInternal { |
| 927 | crate::pac::saadc::vals::Internal::$internal | 927 | crate::pac::saadc::vals::PselpInternal::$internal |
| 928 | } | 928 | } |
| 929 | 929 | ||
| 930 | fn connect(&self) -> crate::pac::saadc::vals::PselpConnect { | 930 | fn connect(&self) -> crate::pac::saadc::vals::PselpConnect { |
diff --git a/embassy-nrf/src/time_driver.rs b/embassy-nrf/src/time_driver.rs index b723e2334..35f65bd64 100644 --- a/embassy-nrf/src/time_driver.rs +++ b/embassy-nrf/src/time_driver.rs | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | use core::cell::{Cell, RefCell}; | 1 | use core::cell::{Cell, RefCell}; |
| 2 | #[cfg(not(feature = "_grtc"))] | ||
| 2 | use core::sync::atomic::{AtomicU32, Ordering, compiler_fence}; | 3 | use core::sync::atomic::{AtomicU32, Ordering, compiler_fence}; |
| 3 | 4 | ||
| 4 | use critical_section::CriticalSection; | 5 | use critical_section::CriticalSection; |
| @@ -8,21 +9,27 @@ use embassy_time_driver::Driver; | |||
| 8 | use embassy_time_queue_utils::Queue; | 9 | use embassy_time_queue_utils::Queue; |
| 9 | 10 | ||
| 10 | use crate::interrupt::InterruptExt; | 11 | use crate::interrupt::InterruptExt; |
| 12 | #[cfg(feature = "_grtc")] | ||
| 13 | use crate::pac::grtc::vals::Busy; | ||
| 11 | use crate::{interrupt, pac}; | 14 | use crate::{interrupt, pac}; |
| 12 | 15 | ||
| 13 | #[cfg(feature = "_nrf54l")] | 16 | #[cfg(feature = "_grtc")] |
| 14 | fn rtc() -> pac::rtc::Rtc { | 17 | fn rtc() -> pac::grtc::Grtc { |
| 15 | pac::RTC30 | 18 | pac::GRTC |
| 16 | } | 19 | } |
| 17 | #[cfg(not(feature = "_nrf54l"))] | 20 | |
| 21 | #[cfg(not(feature = "_grtc"))] | ||
| 18 | fn rtc() -> pac::rtc::Rtc { | 22 | fn rtc() -> pac::rtc::Rtc { |
| 19 | pac::RTC1 | 23 | pac::RTC1 |
| 20 | } | 24 | } |
| 21 | 25 | ||
| 22 | /// Calculate the timestamp from the period count and the tick count. | 26 | /// Calculate the timestamp from the period count and the tick count. |
| 23 | /// | 27 | /// |
| 24 | /// The RTC counter is 24 bit. Ticking at 32768hz, it overflows every ~8 minutes. This is | 28 | /// For nRF54 devices and newer, the GRTC counter is 52 bits, so the time driver uses the |
| 25 | /// too short. We must make it "never" overflow. | 29 | /// syscounter and ignores the periods handling, since it overflows every 142 years. |
| 30 | /// | ||
| 31 | /// For most other devices, the RTC counter is 24 bit. Ticking at 32768hz, it overflows every ~8 minutes. | ||
| 32 | /// This is too short. We must make it "never" overflow. | ||
| 26 | /// | 33 | /// |
| 27 | /// The obvious way would be to count overflow periods. Every time the counter overflows, | 34 | /// The obvious way would be to count overflow periods. Every time the counter overflows, |
| 28 | /// increase a `periods` variable. `now()` simply does `periods << 24 + counter`. So, the logic | 35 | /// increase a `periods` variable. `now()` simply does `periods << 24 + counter`. So, the logic |
| @@ -64,14 +71,39 @@ fn rtc() -> pac::rtc::Rtc { | |||
| 64 | /// `period` is a 32bit integer, so It overflows on 2^32 * 2^23 / 32768 seconds of uptime, which is 34865 | 71 | /// `period` is a 32bit integer, so It overflows on 2^32 * 2^23 / 32768 seconds of uptime, which is 34865 |
| 65 | /// years. For comparison, flash memory like the one containing your firmware is usually rated to retain | 72 | /// years. For comparison, flash memory like the one containing your firmware is usually rated to retain |
| 66 | /// data for only 10-20 years. 34865 years is long enough! | 73 | /// data for only 10-20 years. 34865 years is long enough! |
| 74 | #[cfg(not(feature = "_grtc"))] | ||
| 67 | fn calc_now(period: u32, counter: u32) -> u64 { | 75 | fn calc_now(period: u32, counter: u32) -> u64 { |
| 68 | ((period as u64) << 23) + ((counter ^ ((period & 1) << 23)) as u64) | 76 | ((period as u64) << 23) + ((counter ^ ((period & 1) << 23)) as u64) |
| 69 | } | 77 | } |
| 70 | 78 | ||
| 79 | #[cfg(feature = "_grtc")] | ||
| 80 | fn syscounter() -> u64 { | ||
| 81 | let r = rtc(); | ||
| 82 | r.syscounter(0).active().write(|w| w.set_active(true)); | ||
| 83 | loop { | ||
| 84 | let countl: u32 = r.syscounter(0).syscounterl().read(); | ||
| 85 | let counth = r.syscounter(0).syscounterh().read(); | ||
| 86 | |||
| 87 | if counth.busy() == Busy::READY && !counth.overflow() { | ||
| 88 | let counth: u32 = counth.value(); | ||
| 89 | let count = countl as u64 | ((counth as u64) << 32); | ||
| 90 | r.syscounter(0).active().write(|w| w.set_active(false)); | ||
| 91 | return count; | ||
| 92 | } | ||
| 93 | // If overflow or not ready, loop will re-read both registers | ||
| 94 | } | ||
| 95 | } | ||
| 96 | |||
| 97 | #[cfg(not(feature = "_grtc"))] | ||
| 71 | fn compare_n(n: usize) -> u32 { | 98 | fn compare_n(n: usize) -> u32 { |
| 72 | 1 << (n + 16) | 99 | 1 << (n + 16) |
| 73 | } | 100 | } |
| 74 | 101 | ||
| 102 | #[cfg(feature = "_grtc")] | ||
| 103 | fn compare_n(n: usize) -> u32 { | ||
| 104 | 1 << n // GRTC uses bits 0-11 for COMPARE[0-11] | ||
| 105 | } | ||
| 106 | |||
| 75 | #[cfg(test)] | 107 | #[cfg(test)] |
| 76 | mod test { | 108 | mod test { |
| 77 | use super::*; | 109 | use super::*; |
| @@ -108,6 +140,7 @@ impl AlarmState { | |||
| 108 | 140 | ||
| 109 | struct RtcDriver { | 141 | struct RtcDriver { |
| 110 | /// Number of 2^23 periods elapsed since boot. | 142 | /// Number of 2^23 periods elapsed since boot. |
| 143 | #[cfg(not(feature = "_grtc"))] | ||
| 111 | period: AtomicU32, | 144 | period: AtomicU32, |
| 112 | /// Timestamp at which to fire alarm. u64::MAX if no alarm is scheduled. | 145 | /// Timestamp at which to fire alarm. u64::MAX if no alarm is scheduled. |
| 113 | alarms: Mutex<AlarmState>, | 146 | alarms: Mutex<AlarmState>, |
| @@ -115,6 +148,7 @@ struct RtcDriver { | |||
| 115 | } | 148 | } |
| 116 | 149 | ||
| 117 | embassy_time_driver::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver { | 150 | embassy_time_driver::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver { |
| 151 | #[cfg(not(feature = "_grtc"))] | ||
| 118 | period: AtomicU32::new(0), | 152 | period: AtomicU32::new(0), |
| 119 | alarms: Mutex::const_new(CriticalSectionRawMutex::new(), AlarmState::new()), | 153 | alarms: Mutex::const_new(CriticalSectionRawMutex::new(), AlarmState::new()), |
| 120 | queue: Mutex::new(RefCell::new(Queue::new())), | 154 | queue: Mutex::new(RefCell::new(Queue::new())), |
| @@ -123,25 +157,43 @@ embassy_time_driver::time_driver_impl!(static DRIVER: RtcDriver = RtcDriver { | |||
| 123 | impl RtcDriver { | 157 | impl RtcDriver { |
| 124 | fn init(&'static self, irq_prio: crate::interrupt::Priority) { | 158 | fn init(&'static self, irq_prio: crate::interrupt::Priority) { |
| 125 | let r = rtc(); | 159 | let r = rtc(); |
| 126 | r.cc(3).write(|w| w.set_compare(0x800000)); | 160 | // Chips without GRTC needs to deal with overflow |
| 161 | #[cfg(not(feature = "_grtc"))] | ||
| 162 | { | ||
| 163 | r.cc(3).write(|w| w.set_compare(0x800000)); | ||
| 127 | 164 | ||
| 128 | r.intenset().write(|w| { | 165 | r.intenset().write(|w| { |
| 129 | w.set_ovrflw(true); | 166 | w.set_ovrflw(true); |
| 130 | w.set_compare(3, true); | 167 | w.set_compare(3, true); |
| 131 | }); | 168 | }); |
| 169 | } | ||
| 132 | 170 | ||
| 171 | #[cfg(feature = "_grtc")] | ||
| 172 | { | ||
| 173 | r.mode().write(|w| { | ||
| 174 | w.set_syscounteren(true); | ||
| 175 | }); | ||
| 176 | } | ||
| 133 | r.tasks_clear().write_value(1); | 177 | r.tasks_clear().write_value(1); |
| 134 | r.tasks_start().write_value(1); | 178 | r.tasks_start().write_value(1); |
| 135 | 179 | ||
| 136 | // Wait for clear | 180 | // Wait for clear |
| 181 | #[cfg(not(feature = "_grtc"))] | ||
| 137 | while r.counter().read().0 != 0 {} | 182 | while r.counter().read().0 != 0 {} |
| 138 | 183 | ||
| 139 | #[cfg(feature = "_nrf54l")] | 184 | #[cfg(feature = "_grtc")] |
| 185 | loop { | ||
| 186 | if r.status().lftimer().read().ready() { | ||
| 187 | break; | ||
| 188 | } | ||
| 189 | } | ||
| 190 | |||
| 191 | #[cfg(feature = "_grtc")] | ||
| 140 | { | 192 | { |
| 141 | interrupt::RTC30.set_priority(irq_prio); | 193 | interrupt::GRTC_1.set_priority(irq_prio); |
| 142 | unsafe { interrupt::RTC30.enable() }; | 194 | unsafe { interrupt::GRTC_1.enable() }; |
| 143 | } | 195 | } |
| 144 | #[cfg(not(feature = "_nrf54l"))] | 196 | #[cfg(not(feature = "_grtc"))] |
| 145 | { | 197 | { |
| 146 | interrupt::RTC1.set_priority(irq_prio); | 198 | interrupt::RTC1.set_priority(irq_prio); |
| 147 | unsafe { interrupt::RTC1.enable() }; | 199 | unsafe { interrupt::RTC1.enable() }; |
| @@ -150,11 +202,14 @@ impl RtcDriver { | |||
| 150 | 202 | ||
| 151 | fn on_interrupt(&self) { | 203 | fn on_interrupt(&self) { |
| 152 | let r = rtc(); | 204 | let r = rtc(); |
| 205 | |||
| 206 | #[cfg(not(feature = "_grtc"))] | ||
| 153 | if r.events_ovrflw().read() == 1 { | 207 | if r.events_ovrflw().read() == 1 { |
| 154 | r.events_ovrflw().write_value(0); | 208 | r.events_ovrflw().write_value(0); |
| 155 | self.next_period(); | 209 | self.next_period(); |
| 156 | } | 210 | } |
| 157 | 211 | ||
| 212 | #[cfg(not(feature = "_grtc"))] | ||
| 158 | if r.events_compare(3).read() == 1 { | 213 | if r.events_compare(3).read() == 1 { |
| 159 | r.events_compare(3).write_value(0); | 214 | r.events_compare(3).write_value(0); |
| 160 | self.next_period(); | 215 | self.next_period(); |
| @@ -169,6 +224,7 @@ impl RtcDriver { | |||
| 169 | } | 224 | } |
| 170 | } | 225 | } |
| 171 | 226 | ||
| 227 | #[cfg(not(feature = "_grtc"))] | ||
| 172 | fn next_period(&self) { | 228 | fn next_period(&self) { |
| 173 | critical_section::with(|cs| { | 229 | critical_section::with(|cs| { |
| 174 | let r = rtc(); | 230 | let r = rtc(); |
| @@ -190,7 +246,10 @@ impl RtcDriver { | |||
| 190 | fn trigger_alarm(&self, cs: CriticalSection) { | 246 | fn trigger_alarm(&self, cs: CriticalSection) { |
| 191 | let n = 0; | 247 | let n = 0; |
| 192 | let r = rtc(); | 248 | let r = rtc(); |
| 249 | #[cfg(not(feature = "_grtc"))] | ||
| 193 | r.intenclr().write(|w| w.0 = compare_n(n)); | 250 | r.intenclr().write(|w| w.0 = compare_n(n)); |
| 251 | #[cfg(feature = "_grtc")] | ||
| 252 | r.intenclr(1).write(|w| w.0 = compare_n(n)); | ||
| 194 | 253 | ||
| 195 | let alarm = &self.alarms.borrow(cs); | 254 | let alarm = &self.alarms.borrow(cs); |
| 196 | alarm.timestamp.set(u64::MAX); | 255 | alarm.timestamp.set(u64::MAX); |
| @@ -214,7 +273,10 @@ impl RtcDriver { | |||
| 214 | if timestamp <= t { | 273 | if timestamp <= t { |
| 215 | // If alarm timestamp has passed the alarm will not fire. | 274 | // If alarm timestamp has passed the alarm will not fire. |
| 216 | // Disarm the alarm and return `false` to indicate that. | 275 | // Disarm the alarm and return `false` to indicate that. |
| 276 | #[cfg(not(feature = "_grtc"))] | ||
| 217 | r.intenclr().write(|w| w.0 = compare_n(n)); | 277 | r.intenclr().write(|w| w.0 = compare_n(n)); |
| 278 | #[cfg(feature = "_grtc")] | ||
| 279 | r.intenclr(1).write(|w| w.0 = compare_n(n)); | ||
| 218 | 280 | ||
| 219 | alarm.timestamp.set(u64::MAX); | 281 | alarm.timestamp.set(u64::MAX); |
| 220 | 282 | ||
| @@ -226,7 +288,7 @@ impl RtcDriver { | |||
| 226 | // Write the CC value regardless of whether we're going to enable it now or not. | 288 | // Write the CC value regardless of whether we're going to enable it now or not. |
| 227 | // This way, when we enable it later, the right value is already set. | 289 | // This way, when we enable it later, the right value is already set. |
| 228 | 290 | ||
| 229 | // nrf52 docs say: | 291 | // nrf52 docs say : |
| 230 | // If the COUNTER is N, writing N or N+1 to a CC register may not trigger a COMPARE event. | 292 | // If the COUNTER is N, writing N or N+1 to a CC register may not trigger a COMPARE event. |
| 231 | // To workaround this, we never write a timestamp smaller than N+3. | 293 | // To workaround this, we never write a timestamp smaller than N+3. |
| 232 | // N+2 is not safe because rtc can tick from N to N+1 between calling now() and writing cc. | 294 | // N+2 is not safe because rtc can tick from N to N+1 between calling now() and writing cc. |
| @@ -238,22 +300,39 @@ impl RtcDriver { | |||
| 238 | // This means that an alarm can be delayed for up to 2 ticks (from t+1 to t+3), but this is allowed | 300 | // This means that an alarm can be delayed for up to 2 ticks (from t+1 to t+3), but this is allowed |
| 239 | // by the Alarm trait contract. What's not allowed is triggering alarms *before* their scheduled time, | 301 | // by the Alarm trait contract. What's not allowed is triggering alarms *before* their scheduled time, |
| 240 | // and we don't do that here. | 302 | // and we don't do that here. |
| 241 | let safe_timestamp = timestamp.max(t + 3); | 303 | #[cfg(not(feature = "_grtc"))] |
| 242 | r.cc(n).write(|w| w.set_compare(safe_timestamp as u32 & 0xFFFFFF)); | 304 | { |
| 243 | 305 | let safe_timestamp = timestamp.max(t + 3); | |
| 244 | let diff = timestamp - t; | 306 | r.cc(n).write(|w| w.set_compare(safe_timestamp as u32 & 0xFFFFFF)); |
| 245 | if diff < 0xc00000 { | 307 | let diff = timestamp - t; |
| 246 | r.intenset().write(|w| w.0 = compare_n(n)); | 308 | if diff < 0xc00000 { |
| 247 | 309 | r.intenset().write(|w| w.0 = compare_n(n)); | |
| 248 | // If we have not passed the timestamp, we can be sure the alarm will be invoked. Otherwise, | 310 | |
| 249 | // we need to retry setting the alarm. | 311 | // If we have not passed the timestamp, we can be sure the alarm will be invoked. Otherwise, |
| 250 | if self.now() + 2 <= timestamp { | 312 | // we need to retry setting the alarm. |
| 313 | if self.now() + 2 <= timestamp { | ||
| 314 | return true; | ||
| 315 | } | ||
| 316 | } else { | ||
| 317 | // If it's too far in the future, don't setup the compare channel yet. | ||
| 318 | // It will be setup later by `next_period`. | ||
| 319 | r.intenclr().write(|w| w.0 = compare_n(n)); | ||
| 251 | return true; | 320 | return true; |
| 252 | } | 321 | } |
| 253 | } else { | 322 | } |
| 254 | // If it's too far in the future, don't setup the compare channel yet. | 323 | |
| 255 | // It will be setup later by `next_period`. | 324 | // The nRF54 datasheet states that 'The EVENTS_COMPARE[n] event is generated immediately if the |
| 256 | r.intenclr().write(|w| w.0 = compare_n(n)); | 325 | // configured compare value at CC[n] is less than the current SYSCOUNTER value.'. This means we |
| 326 | // can write the expected timestamp and be sure the alarm is triggered. | ||
| 327 | #[cfg(feature = "_grtc")] | ||
| 328 | { | ||
| 329 | let ccl = timestamp as u32; | ||
| 330 | let cch = (timestamp >> 32) as u32 & 0xFFFFF; // 20 bits for CCH | ||
| 331 | |||
| 332 | r.cc(n).ccl().write_value(ccl); | ||
| 333 | r.cc(n).cch().write(|w| w.set_cch(cch)); | ||
| 334 | r.intenset(1).write(|w| w.0 = compare_n(n)); | ||
| 335 | |||
| 257 | return true; | 336 | return true; |
| 258 | } | 337 | } |
| 259 | } | 338 | } |
| @@ -261,6 +340,7 @@ impl RtcDriver { | |||
| 261 | } | 340 | } |
| 262 | 341 | ||
| 263 | impl Driver for RtcDriver { | 342 | impl Driver for RtcDriver { |
| 343 | #[cfg(not(feature = "_grtc"))] | ||
| 264 | fn now(&self) -> u64 { | 344 | fn now(&self) -> u64 { |
| 265 | // `period` MUST be read before `counter`, see comment at the top for details. | 345 | // `period` MUST be read before `counter`, see comment at the top for details. |
| 266 | let period = self.period.load(Ordering::Relaxed); | 346 | let period = self.period.load(Ordering::Relaxed); |
| @@ -269,10 +349,14 @@ impl Driver for RtcDriver { | |||
| 269 | calc_now(period, counter) | 349 | calc_now(period, counter) |
| 270 | } | 350 | } |
| 271 | 351 | ||
| 352 | #[cfg(feature = "_grtc")] | ||
| 353 | fn now(&self) -> u64 { | ||
| 354 | syscounter() | ||
| 355 | } | ||
| 356 | |||
| 272 | fn schedule_wake(&self, at: u64, waker: &core::task::Waker) { | 357 | fn schedule_wake(&self, at: u64, waker: &core::task::Waker) { |
| 273 | critical_section::with(|cs| { | 358 | critical_section::with(|cs| { |
| 274 | let mut queue = self.queue.borrow(cs).borrow_mut(); | 359 | let mut queue = self.queue.borrow(cs).borrow_mut(); |
| 275 | |||
| 276 | if queue.schedule_wake(at, waker) { | 360 | if queue.schedule_wake(at, waker) { |
| 277 | let mut next = queue.next_expiration(self.now()); | 361 | let mut next = queue.next_expiration(self.now()); |
| 278 | while !self.set_alarm(cs, next) { | 362 | while !self.set_alarm(cs, next) { |
| @@ -283,14 +367,14 @@ impl Driver for RtcDriver { | |||
| 283 | } | 367 | } |
| 284 | } | 368 | } |
| 285 | 369 | ||
| 286 | #[cfg(feature = "_nrf54l")] | 370 | #[cfg(feature = "_grtc")] |
| 287 | #[cfg(feature = "rt")] | 371 | #[cfg(feature = "rt")] |
| 288 | #[interrupt] | 372 | #[interrupt] |
| 289 | fn RTC30() { | 373 | fn GRTC_1() { |
| 290 | DRIVER.on_interrupt() | 374 | DRIVER.on_interrupt() |
| 291 | } | 375 | } |
| 292 | 376 | ||
| 293 | #[cfg(not(feature = "_nrf54l"))] | 377 | #[cfg(not(feature = "_grtc"))] |
| 294 | #[cfg(feature = "rt")] | 378 | #[cfg(feature = "rt")] |
| 295 | #[interrupt] | 379 | #[interrupt] |
| 296 | fn RTC1() { | 380 | fn RTC1() { |
diff --git a/embassy-rp/CHANGELOG.md b/embassy-rp/CHANGELOG.md index 7480b729f..773301b0f 100644 --- a/embassy-rp/CHANGELOG.md +++ b/embassy-rp/CHANGELOG.md | |||
| @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 8 | <!-- next-header --> | 8 | <!-- next-header --> |
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | ## 0.9.0 - 2025-11-27 | ||
| 12 | |||
| 11 | - Add documentation for pio `get_x` about autopush. | 13 | - Add documentation for pio `get_x` about autopush. |
| 12 | - Fix several minor typos in documentation | 14 | - Fix several minor typos in documentation |
| 13 | - Add PIO SPI | 15 | - Add PIO SPI |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 421f0b0f6..8e4bb927f 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-rp" | 2 | name = "embassy-rp" |
| 3 | version = "0.8.0" | 3 | version = "0.9.0" |
| 4 | edition = "2024" | 4 | edition = "2024" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller" | 6 | description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller" |
diff --git a/embassy-stm32/CHANGELOG.md b/embassy-stm32/CHANGELOG.md index 4c38b0add..2b273482c 100644 --- a/embassy-stm32/CHANGELOG.md +++ b/embassy-stm32/CHANGELOG.md | |||
| @@ -84,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 84 | - removal: ExtiInput no longer accepts AnyPin/AnyChannel; AnyChannel removed entirely | 84 | - removal: ExtiInput no longer accepts AnyPin/AnyChannel; AnyChannel removed entirely |
| 85 | - fix: build script ensures EXTI2_TSC is listed as the IRQ of EXTI2 even if the PAC doesn't | 85 | - fix: build script ensures EXTI2_TSC is listed as the IRQ of EXTI2 even if the PAC doesn't |
| 86 | - feat: stm32/lcd: added implementation | 86 | - feat: stm32/lcd: added implementation |
| 87 | - change: add error messages to can timing calculations ([#4961](https://github.com/embassy-rs/embassy/pull/4961)) | ||
| 87 | 88 | ||
| 88 | ## 0.4.0 - 2025-08-26 | 89 | ## 0.4.0 - 2025-08-26 |
| 89 | 90 | ||
diff --git a/embassy-stm32/src/can/enums.rs b/embassy-stm32/src/can/enums.rs index 6d91020fc..c5900cadc 100644 --- a/embassy-stm32/src/can/enums.rs +++ b/embassy-stm32/src/can/enums.rs | |||
| @@ -82,3 +82,40 @@ pub enum RefCountOp { | |||
| 82 | /// Notify sender destroyed | 82 | /// Notify sender destroyed |
| 83 | NotifySenderDestroyed, | 83 | NotifySenderDestroyed, |
| 84 | } | 84 | } |
| 85 | |||
| 86 | /// Error returned when calculating the can timing fails | ||
| 87 | #[derive(Debug)] | ||
| 88 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | ||
| 89 | pub enum TimingCalcError { | ||
| 90 | /// Bitrate is lower than 1000 | ||
| 91 | BitrateTooLow { | ||
| 92 | /// The set bitrate | ||
| 93 | bitrate: u32, | ||
| 94 | }, | ||
| 95 | /// No solution possible | ||
| 96 | NoSolution { | ||
| 97 | /// The sum of BS1 and BS2 | ||
| 98 | bs1_bs2_sum: u8, | ||
| 99 | }, | ||
| 100 | /// Prescaler is not 1 < prescaler < 1024 | ||
| 101 | InvalidPrescaler { | ||
| 102 | /// The calculated prescaler value | ||
| 103 | prescaler: u32, | ||
| 104 | }, | ||
| 105 | /// BS1 or BS2 are not in the range 0 < BSx < BSx_MAX | ||
| 106 | BSNotInRange { | ||
| 107 | /// The value of BS1 | ||
| 108 | bs1: u8, | ||
| 109 | /// The value of BS2 | ||
| 110 | bs2: u8, | ||
| 111 | }, | ||
| 112 | /// Final bitrate doesn't match the requested bitrate | ||
| 113 | NoMatch { | ||
| 114 | /// The requested bitrate | ||
| 115 | requested: u32, | ||
| 116 | /// The calculated bitrate | ||
| 117 | final_calculated: u32, | ||
| 118 | }, | ||
| 119 | /// core::num::NonZeroUxx::new error | ||
| 120 | CoreNumNew, | ||
| 121 | } | ||
diff --git a/embassy-stm32/src/can/util.rs b/embassy-stm32/src/can/util.rs index 6d7f0c16a..beca4c34e 100644 --- a/embassy-stm32/src/can/util.rs +++ b/embassy-stm32/src/can/util.rs | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | use core::num::{NonZeroU8, NonZeroU16}; | 3 | use core::num::{NonZeroU8, NonZeroU16}; |
| 4 | 4 | ||
| 5 | use crate::can::enums::TimingCalcError; | ||
| 6 | |||
| 5 | /// Shared struct to represent bit timings used by calc_can_timings. | 7 | /// Shared struct to represent bit timings used by calc_can_timings. |
| 6 | #[derive(Clone, Copy, Debug)] | 8 | #[derive(Clone, Copy, Debug)] |
| 7 | pub struct NominalBitTiming { | 9 | pub struct NominalBitTiming { |
| @@ -17,7 +19,10 @@ pub struct NominalBitTiming { | |||
| 17 | } | 19 | } |
| 18 | 20 | ||
| 19 | /// Calculate nominal CAN bit timing based on CAN bitrate and periphial clock frequency | 21 | /// Calculate nominal CAN bit timing based on CAN bitrate and periphial clock frequency |
| 20 | pub fn calc_can_timings(periph_clock: crate::time::Hertz, can_bitrate: u32) -> Option<NominalBitTiming> { | 22 | pub fn calc_can_timings( |
| 23 | periph_clock: crate::time::Hertz, | ||
| 24 | can_bitrate: u32, | ||
| 25 | ) -> Result<NominalBitTiming, TimingCalcError> { | ||
| 21 | const BS1_MAX: u8 = 16; | 26 | const BS1_MAX: u8 = 16; |
| 22 | const BS2_MAX: u8 = 8; | 27 | const BS2_MAX: u8 = 8; |
| 23 | const MAX_SAMPLE_POINT_PERMILL: u16 = 900; | 28 | const MAX_SAMPLE_POINT_PERMILL: u16 = 900; |
| @@ -25,7 +30,7 @@ pub fn calc_can_timings(periph_clock: crate::time::Hertz, can_bitrate: u32) -> O | |||
| 25 | let periph_clock = periph_clock.0; | 30 | let periph_clock = periph_clock.0; |
| 26 | 31 | ||
| 27 | if can_bitrate < 1000 { | 32 | if can_bitrate < 1000 { |
| 28 | return None; | 33 | return Err(TimingCalcError::BitrateTooLow { bitrate: can_bitrate }); |
| 29 | } | 34 | } |
| 30 | 35 | ||
| 31 | // Ref. "Automatic Baudrate Detection in CANopen Networks", U. Koppe, MicroControl GmbH & Co. KG | 36 | // Ref. "Automatic Baudrate Detection in CANopen Networks", U. Koppe, MicroControl GmbH & Co. KG |
| @@ -53,14 +58,14 @@ pub fn calc_can_timings(periph_clock: crate::time::Hertz, can_bitrate: u32) -> O | |||
| 53 | let mut bs1_bs2_sum = max_quanta_per_bit - 1; | 58 | let mut bs1_bs2_sum = max_quanta_per_bit - 1; |
| 54 | while (prescaler_bs % (1 + bs1_bs2_sum) as u32) != 0 { | 59 | while (prescaler_bs % (1 + bs1_bs2_sum) as u32) != 0 { |
| 55 | if bs1_bs2_sum <= 2 { | 60 | if bs1_bs2_sum <= 2 { |
| 56 | return None; // No solution | 61 | return Err(TimingCalcError::NoSolution { bs1_bs2_sum }); // No solution |
| 57 | } | 62 | } |
| 58 | bs1_bs2_sum -= 1; | 63 | bs1_bs2_sum -= 1; |
| 59 | } | 64 | } |
| 60 | 65 | ||
| 61 | let prescaler = prescaler_bs / (1 + bs1_bs2_sum) as u32; | 66 | let prescaler = prescaler_bs / (1 + bs1_bs2_sum) as u32; |
| 62 | if (prescaler < 1) || (prescaler > 1024) { | 67 | if (prescaler < 1) || (prescaler > 1024) { |
| 63 | return None; // No solution | 68 | return Err(TimingCalcError::InvalidPrescaler { prescaler }); // No solution |
| 64 | } | 69 | } |
| 65 | 70 | ||
| 66 | // Now we have a constraint: (BS1 + BS2) == bs1_bs2_sum. | 71 | // Now we have a constraint: (BS1 + BS2) == bs1_bs2_sum. |
| @@ -93,22 +98,26 @@ pub fn calc_can_timings(periph_clock: crate::time::Hertz, can_bitrate: u32) -> O | |||
| 93 | 98 | ||
| 94 | // Check is BS1 and BS2 are in range | 99 | // Check is BS1 and BS2 are in range |
| 95 | if (bs1 < 1) || (bs1 > BS1_MAX) || (bs2 < 1) || (bs2 > BS2_MAX) { | 100 | if (bs1 < 1) || (bs1 > BS1_MAX) || (bs2 < 1) || (bs2 > BS2_MAX) { |
| 96 | return None; | 101 | return Err(TimingCalcError::BSNotInRange { bs1, bs2 }); |
| 97 | } | 102 | } |
| 98 | 103 | ||
| 104 | let calculated = periph_clock / (prescaler * (1 + bs1 + bs2) as u32); | ||
| 99 | // Check if final bitrate matches the requested | 105 | // Check if final bitrate matches the requested |
| 100 | if can_bitrate != (periph_clock / (prescaler * (1 + bs1 + bs2) as u32)) { | 106 | if can_bitrate != calculated { |
| 101 | return None; | 107 | return Err(TimingCalcError::NoMatch { |
| 108 | requested: can_bitrate, | ||
| 109 | final_calculated: calculated, | ||
| 110 | }); | ||
| 102 | } | 111 | } |
| 103 | 112 | ||
| 104 | // One is recommended by DS-015, CANOpen, and DeviceNet | 113 | // One is recommended by DS-015, CANOpen, and DeviceNet |
| 105 | let sync_jump_width = core::num::NonZeroU8::new(1)?; | 114 | let sync_jump_width = core::num::NonZeroU8::new(1).ok_or(TimingCalcError::CoreNumNew)?; |
| 106 | 115 | ||
| 107 | let seg1 = core::num::NonZeroU8::new(bs1)?; | 116 | let seg1 = core::num::NonZeroU8::new(bs1).ok_or(TimingCalcError::CoreNumNew)?; |
| 108 | let seg2 = core::num::NonZeroU8::new(bs2)?; | 117 | let seg2 = core::num::NonZeroU8::new(bs2).ok_or(TimingCalcError::CoreNumNew)?; |
| 109 | let nz_prescaler = core::num::NonZeroU16::new(prescaler as u16)?; | 118 | let nz_prescaler = core::num::NonZeroU16::new(prescaler as u16).ok_or(TimingCalcError::CoreNumNew)?; |
| 110 | 119 | ||
| 111 | Some(NominalBitTiming { | 120 | Ok(NominalBitTiming { |
| 112 | sync_jump_width, | 121 | sync_jump_width, |
| 113 | prescaler: nz_prescaler, | 122 | prescaler: nz_prescaler, |
| 114 | seg1, | 123 | seg1, |
diff --git a/examples/boot/application/rp/Cargo.toml b/examples/boot/application/rp/Cargo.toml index 70a2c28c3..292d1abec 100644 --- a/examples/boot/application/rp/Cargo.toml +++ b/examples/boot/application/rp/Cargo.toml | |||
| @@ -9,8 +9,8 @@ publish = false | |||
| 9 | embassy-sync = { version = "0.7.2", path = "../../../../embassy-sync" } | 9 | embassy-sync = { version = "0.7.2", path = "../../../../embassy-sync" } |
| 10 | embassy-executor = { version = "0.9.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread"] } | 10 | embassy-executor = { version = "0.9.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread"] } |
| 11 | embassy-time = { version = "0.5.0", path = "../../../../embassy-time", features = [] } | 11 | embassy-time = { version = "0.5.0", path = "../../../../embassy-time", features = [] } |
| 12 | embassy-rp = { version = "0.8.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] } | 12 | embassy-rp = { version = "0.9.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] } |
| 13 | embassy-boot-rp = { version = "0.8.0", path = "../../../../embassy-boot-rp", features = [] } | 13 | embassy-boot-rp = { version = "0.9.0", path = "../../../../embassy-boot-rp", features = [] } |
| 14 | embassy-embedded-hal = { version = "0.5.0", path = "../../../../embassy-embedded-hal" } | 14 | embassy-embedded-hal = { version = "0.5.0", path = "../../../../embassy-embedded-hal" } |
| 15 | 15 | ||
| 16 | defmt = "1.0.1" | 16 | defmt = "1.0.1" |
diff --git a/examples/nrf54l15/Cargo.toml b/examples/nrf54l15/Cargo.toml index 4ef77279f..f34df0f26 100644 --- a/examples/nrf54l15/Cargo.toml +++ b/examples/nrf54l15/Cargo.toml | |||
| @@ -10,7 +10,7 @@ embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } | |||
| 10 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 10 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 11 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } | 12 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } |
| 13 | embassy-nrf = { version = "0.8.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 13 | embassy-nrf = { version = "0.8.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-grtc", "gpiote", "unstable-pac", "time"] } |
| 14 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } | 14 | embedded-io = { version = "0.6.0", features = ["defmt-03"] } |
| 15 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | 15 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 16 | 16 | ||
diff --git a/examples/nrf54l15/src/bin/rtc.rs b/examples/nrf54l15/src/bin/rtc.rs deleted file mode 100644 index a45aaca52..000000000 --- a/examples/nrf54l15/src/bin/rtc.rs +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | use core::cell::RefCell; | ||
| 5 | |||
| 6 | use embassy_executor::Spawner; | ||
| 7 | use embassy_nrf::gpio::{Level, Output, OutputDrive}; | ||
| 8 | use embassy_nrf::interrupt; | ||
| 9 | use embassy_nrf::rtc::Rtc; | ||
| 10 | use embassy_sync::blocking_mutex::Mutex; | ||
| 11 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||
| 12 | use portable_atomic::AtomicU64; | ||
| 13 | use {defmt_rtt as _, panic_probe as _}; | ||
| 14 | |||
| 15 | // 64 bit counter which will never overflow. | ||
| 16 | static TICK_COUNTER: AtomicU64 = AtomicU64::new(0); | ||
| 17 | static RTC: Mutex<CriticalSectionRawMutex, RefCell<Option<Rtc<'static>>>> = Mutex::new(RefCell::new(None)); | ||
| 18 | |||
| 19 | #[embassy_executor::main] | ||
| 20 | async fn main(_spawner: Spawner) { | ||
| 21 | defmt::println!("nRF54L15 RTC example"); | ||
| 22 | let p = embassy_nrf::init(Default::default()); | ||
| 23 | let mut led = Output::new(p.P2_09, Level::High, OutputDrive::Standard); | ||
| 24 | // Counter resolution is 125 ms. | ||
| 25 | let mut rtc = Rtc::new(p.RTC10, (1 << 12) - 1).unwrap(); | ||
| 26 | rtc.enable_interrupt(embassy_nrf::rtc::Interrupt::Tick, true); | ||
| 27 | rtc.enable_event(embassy_nrf::rtc::Interrupt::Tick); | ||
| 28 | rtc.enable(); | ||
| 29 | RTC.lock(|r| { | ||
| 30 | let mut rtc_borrow = r.borrow_mut(); | ||
| 31 | *rtc_borrow = Some(rtc); | ||
| 32 | }); | ||
| 33 | |||
| 34 | let mut last_counter_val = 0; | ||
| 35 | loop { | ||
| 36 | let current = TICK_COUNTER.load(core::sync::atomic::Ordering::Relaxed); | ||
| 37 | if current != last_counter_val { | ||
| 38 | led.toggle(); | ||
| 39 | last_counter_val = current; | ||
| 40 | } | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | #[interrupt] | ||
| 45 | fn RTC10() { | ||
| 46 | // For 64-bit, we do not need to worry about overflowing, at least not for realistic program | ||
| 47 | // lifetimes. | ||
| 48 | TICK_COUNTER.fetch_add(1, core::sync::atomic::Ordering::Relaxed); | ||
| 49 | RTC.lock(|r| { | ||
| 50 | let mut rtc_borrow = r.borrow_mut(); | ||
| 51 | rtc_borrow | ||
| 52 | .as_mut() | ||
| 53 | .unwrap() | ||
| 54 | .reset_event(embassy_nrf::rtc::Interrupt::Tick); | ||
| 55 | }); | ||
| 56 | } | ||
diff --git a/examples/nrf54l15/src/bin/timer.rs b/examples/nrf54l15/src/bin/timer.rs new file mode 100644 index 000000000..68acc91c1 --- /dev/null +++ b/examples/nrf54l15/src/bin/timer.rs | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | |||
| 4 | use defmt::{info, unwrap}; | ||
| 5 | use embassy_executor::Spawner; | ||
| 6 | use embassy_time::Timer; | ||
| 7 | use {defmt_rtt as _, panic_probe as _}; | ||
| 8 | |||
| 9 | #[embassy_executor::task] | ||
| 10 | async fn run1() { | ||
| 11 | loop { | ||
| 12 | info!("BIG INFREQUENT TICK"); | ||
| 13 | Timer::after_secs(10).await; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | #[embassy_executor::task] | ||
| 18 | async fn run2() { | ||
| 19 | loop { | ||
| 20 | info!("tick"); | ||
| 21 | Timer::after_secs(1).await; | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | #[embassy_executor::main] | ||
| 26 | async fn main(spawner: Spawner) { | ||
| 27 | let _p = embassy_nrf::init(Default::default()); | ||
| 28 | spawner.spawn(unwrap!(run1())); | ||
| 29 | spawner.spawn(unwrap!(run2())); | ||
| 30 | } | ||
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 9d7d99259..e247f6f7a 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -11,14 +11,14 @@ embassy-embedded-hal = { version = "0.5.0", path = "../../embassy-embedded-hal", | |||
| 11 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 12 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 13 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 13 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 14 | embassy-rp = { version = "0.8.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } | 14 | embassy-rp = { version = "0.9.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } |
| 15 | embassy-usb = { version = "0.5.1", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.5.1", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "icmp", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] } | 16 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "icmp", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] } |
| 17 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } | 17 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 18 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } | 18 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } |
| 19 | embassy-usb-logger = { version = "0.5.1", path = "../../embassy-usb-logger" } | 19 | embassy-usb-logger = { version = "0.5.1", path = "../../embassy-usb-logger" } |
| 20 | cyw43 = { version = "0.5.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } | 20 | cyw43 = { version = "0.6.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 21 | cyw43-pio = { version = "0.8.0", path = "../../cyw43-pio", features = ["defmt"] } | 21 | cyw43-pio = { version = "0.9.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 22 | 22 | ||
| 23 | defmt = "1.0.1" | 23 | defmt = "1.0.1" |
| 24 | defmt-rtt = "1.0.0" | 24 | defmt-rtt = "1.0.0" |
diff --git a/examples/rp235x/Cargo.toml b/examples/rp235x/Cargo.toml index ad396275b..16dfb5b77 100644 --- a/examples/rp235x/Cargo.toml +++ b/examples/rp235x/Cargo.toml | |||
| @@ -11,14 +11,14 @@ embassy-embedded-hal = { version = "0.5.0", path = "../../embassy-embedded-hal", | |||
| 11 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 12 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 13 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 13 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 14 | embassy-rp = { version = "0.8.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] } | 14 | embassy-rp = { version = "0.9.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] } |
| 15 | embassy-usb = { version = "0.5.1", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.5.1", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "icmp", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } | 16 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "icmp", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } |
| 17 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } | 17 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 18 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } | 18 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } |
| 19 | embassy-usb-logger = { version = "0.5.1", path = "../../embassy-usb-logger" } | 19 | embassy-usb-logger = { version = "0.5.1", path = "../../embassy-usb-logger" } |
| 20 | cyw43 = { version = "0.5.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } | 20 | cyw43 = { version = "0.6.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 21 | cyw43-pio = { version = "0.8.0", path = "../../cyw43-pio", features = ["defmt"] } | 21 | cyw43-pio = { version = "0.9.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 22 | 22 | ||
| 23 | defmt = "1.0.1" | 23 | defmt = "1.0.1" |
| 24 | defmt-rtt = "1.0.0" | 24 | defmt-rtt = "1.0.0" |
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index 640e58f11..4dfe6904e 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -16,7 +16,7 @@ teleprobe-meta = "1.1" | |||
| 16 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } | 16 | embassy-sync = { version = "0.7.2", path = "../../embassy-sync", features = ["defmt"] } |
| 17 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 17 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 18 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", ] } | 18 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", ] } |
| 19 | embassy-rp = { version = "0.8.0", path = "../../embassy-rp", features = [ "defmt", "unstable-pac", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } | 19 | embassy-rp = { version = "0.9.0", path = "../../embassy-rp", features = [ "defmt", "unstable-pac", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } |
| 20 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } | 20 | embassy-futures = { version = "0.1.2", path = "../../embassy-futures" } |
| 21 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } | 21 | embassy-net = { version = "0.7.1", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } |
| 22 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } | 22 | embassy-net-wiznet = { version = "0.2.1", path = "../../embassy-net-wiznet", features = ["defmt"] } |
