From f60827bffc02965249ec3e7284ae8d09f6a54aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Mon, 29 Jan 2024 18:07:22 +0100 Subject: [PATCH] Fix tick rates not being applied --- CHANGELOG.md | 2 ++ esp32-hal/Cargo.toml | 7 ++++--- esp32c2-hal/Cargo.toml | 9 +++++---- esp32c3-hal/Cargo.toml | 9 +++++---- esp32c6-hal/Cargo.toml | 9 +++++---- esp32h2-hal/Cargo.toml | 9 +++++---- esp32p4-hal/Cargo.toml | 9 +++++---- esp32s2-hal/Cargo.toml | 9 +++++---- esp32s3-hal/Cargo.toml | 11 ++++++----- 9 files changed, 42 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc760733423..9908a80de0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix embassy-time tick rate not set when using systick as the embassy timebase + ### Changed ### Removed diff --git a/esp32-hal/Cargo.toml b/esp32-hal/Cargo.toml index f459c0c6a94..faa594a3b2f 100644 --- a/esp32-hal/Cargo.toml +++ b/esp32-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -101,7 +102,7 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32c2-hal/Cargo.toml b/esp32c2-hal/Cargo.toml index e803e920563..e6e2b4c2a6c 100644 --- a/esp32c2-hal/Cargo.toml +++ b/esp32c2-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32c2"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32c2"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] critical-section = "1.1.2" @@ -94,10 +95,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["dep:embassy-time-driver", "esp-hal-common/embassy-time-timg0", "embassy-time-driver?/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32c3-hal/Cargo.toml b/esp32c3-hal/Cargo.toml index 90673b8eb02..d9a7287951b 100644 --- a/esp32c3-hal/Cargo.toml +++ b/esp32c3-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32c3"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32c3"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -100,10 +101,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32c6-hal/Cargo.toml b/esp32c6-hal/Cargo.toml index da885b8fdd2..e7d5b9c298d 100644 --- a/esp32c6-hal/Cargo.toml +++ b/esp32c6-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32c6"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32c6"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -105,10 +106,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32h2-hal/Cargo.toml b/esp32h2-hal/Cargo.toml index 24eed5ca18a..9275bd3ed3c 100644 --- a/esp32h2-hal/Cargo.toml +++ b/esp32h2-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32h2"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32h2"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -105,10 +106,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32p4-hal/Cargo.toml b/esp32p4-hal/Cargo.toml index 62324845526..39c4fedca69 100644 --- a/esp32p4-hal/Cargo.toml +++ b/esp32p4-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32p4"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32p4"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] embassy-time = "0.3.0" @@ -80,10 +81,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32s2-hal/Cargo.toml b/esp32s2-hal/Cargo.toml index 575aeeb26b4..f1e04fb5ff4 100644 --- a/esp32s2-hal/Cargo.toml +++ b/esp32s2-hal/Cargo.toml @@ -21,8 +21,9 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32s2"], path = "../esp-hal-common" } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32s2"], path = "../esp-hal-common" } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -98,10 +99,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-80_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true diff --git a/esp32s3-hal/Cargo.toml b/esp32s3-hal/Cargo.toml index d41bfa4022b..f3e355bfd36 100644 --- a/esp32s3-hal/Cargo.toml +++ b/esp32s3-hal/Cargo.toml @@ -21,9 +21,10 @@ categories = [ ] [dependencies] -document-features = "0.2.7" -esp-hal-common = { version = "0.15.0", features = ["esp32s3"], path = "../esp-hal-common" } -r0 = { version = "1.0.0", optional = true } +document-features = "0.2.7" +esp-hal-common = { version = "0.15.0", features = ["esp32s3"], path = "../esp-hal-common" } +r0 = { version = "1.0.0", optional = true } +embassy-time-driver = { version = "0.1.0", optional = true } [dev-dependencies] aes = "0.8.3" @@ -113,10 +114,10 @@ embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"] embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"] ## Enable the embassy time driver using the `SYSTIMER` peripheral. The ## `SYSTIMER` peripheral has three alarams available for use. -embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"] +embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time-driver/tick-hz-16_000_000"] ## Enable the embassy time driver using the `TIMG0` peripheral. The `TIMG0` ## peripheral has two alarms available for use. -embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"] +embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time-driver/tick-hz-1_000_000"] [profile.release] debug = true