From 8df7a7259409ec1f870c15a07d66084fbc7fc777 Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov Date: Mon, 27 Apr 2026 16:16:09 +0200 Subject: [PATCH 1/4] Enable RTC timekeeping on C5 and C61 --- esp-hal/README.md | 1 - esp-hal/src/rtc_cntl/mod.rs | 4 ++-- esp-metadata-generated/src/_build_script_utils.rs | 4 ++++ esp-metadata/devices/esp32c5.toml | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/esp-hal/README.md b/esp-hal/README.md index 9ddca2f904d..7dfeff84a90 100644 --- a/esp-hal/README.md +++ b/esp-hal/README.md @@ -129,7 +129,6 @@ For help getting started with this HAL, please refer to [The Rust on ESP Book] a [5155]: https://github.com/esp-rs/esp-hal/issues/5155 [5160]: https://github.com/esp-rs/esp-hal/issues/5160 [5161]: https://github.com/esp-rs/esp-hal/issues/5161 -[5162]: https://github.com/esp-rs/esp-hal/issues/5162 [5163]: https://github.com/esp-rs/esp-hal/issues/5163 [5164]: https://github.com/esp-rs/esp-hal/issues/5164 [5165]: https://github.com/esp-rs/esp-hal/issues/5165 diff --git a/esp-hal/src/rtc_cntl/mod.rs b/esp-hal/src/rtc_cntl/mod.rs index b76f923ff1e..6c007c5e7c0 100644 --- a/esp-hal/src/rtc_cntl/mod.rs +++ b/esp-hal/src/rtc_cntl/mod.rs @@ -232,7 +232,7 @@ impl<'d> Rtc<'d> { let h = rtc_cntl.time1().read().time_hi().bits(); let l = rtc_cntl.time0().read().time_lo().bits(); - } else if #[cfg(any(esp32c6, esp32h2))] { + } else if #[cfg(any(esp32c5, esp32c6, esp32c61, esp32h2))] { rtc_cntl.update().write(|w| w.main_timer_update().set_bit()); let h = rtc_cntl @@ -427,7 +427,7 @@ impl<'d> Rtc<'d> { #[cfg(lp_timer_driver_supported)] pub fn set_interrupt_handler(&mut self, handler: InterruptHandler) { cfg_if::cfg_if! { - if #[cfg(any(esp32c6, esp32h2))] { + if #[cfg(any(esp32c5, esp32c6, esp32c61, esp32h2))] { let interrupt = Interrupt::LP_WDT; } else { let interrupt = Interrupt::RTC_CORE; diff --git a/esp-metadata-generated/src/_build_script_utils.rs b/esp-metadata-generated/src/_build_script_utils.rs index 9af303284b4..21721c94fff 100644 --- a/esp-metadata-generated/src/_build_script_utils.rs +++ b/esp-metadata-generated/src/_build_script_utils.rs @@ -1803,6 +1803,7 @@ impl Chip { "rmt_driver_supported", "rng_driver_supported", "rsa_driver_supported", + "lp_timer_driver_supported", "sha_driver_supported", "soc_driver_supported", "spi_master_driver_supported", @@ -2051,6 +2052,7 @@ impl Chip { "cargo:rustc-cfg=rmt_driver_supported", "cargo:rustc-cfg=rng_driver_supported", "cargo:rustc-cfg=rsa_driver_supported", + "cargo:rustc-cfg=lp_timer_driver_supported", "cargo:rustc-cfg=sha_driver_supported", "cargo:rustc-cfg=soc_driver_supported", "cargo:rustc-cfg=spi_master_driver_supported", @@ -3111,6 +3113,7 @@ impl Chip { "phy_driver_supported", "psram_driver_supported", "rng_driver_supported", + "lp_timer_driver_supported", "sha_driver_supported", "soc_driver_supported", "spi_master_driver_supported", @@ -3299,6 +3302,7 @@ impl Chip { "cargo:rustc-cfg=phy_driver_supported", "cargo:rustc-cfg=psram_driver_supported", "cargo:rustc-cfg=rng_driver_supported", + "cargo:rustc-cfg=lp_timer_driver_supported", "cargo:rustc-cfg=sha_driver_supported", "cargo:rustc-cfg=soc_driver_supported", "cargo:rustc-cfg=spi_master_driver_supported", diff --git a/esp-metadata/devices/esp32c5.toml b/esp-metadata/devices/esp32c5.toml index efdd663a829..5fa22f18f8e 100644 --- a/esp-metadata/devices/esp32c5.toml +++ b/esp-metadata/devices/esp32c5.toml @@ -722,7 +722,6 @@ support_status = { status = "not_supported", issue = 5169 } support_status = { status = "not_supported", issue = 5160 } [device.lp_timer] -support_status = { status = "not_supported", issue = 5162 } [device.temp_sensor] support_status = { status = "not_supported", issue = 5153 } From 80a209c061af1acfc7686d63e61af05923068899 Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov Date: Mon, 27 Apr 2026 16:17:10 +0200 Subject: [PATCH 2/4] rebase --- esp-hal/README.md | 3 +-- esp-metadata/devices/esp32c61.toml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/esp-hal/README.md b/esp-hal/README.md index 7dfeff84a90..0dd435d7ec4 100644 --- a/esp-hal/README.md +++ b/esp-hal/README.md @@ -94,7 +94,7 @@ For help getting started with this HAL, please refer to [The Rust on ESP Book] a | RMT | ⚒️ | | ⚒️ | ⚒️ | ⚒️ | | ⚒️ | ⚒️ | ⚒️ | | RNG | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | | RSA | ⚒️ | | ⚒️ | ⚒️ | ⚒️ | | ⚒️ | ⚒️ | ⚒️ | -| RTC Timekeeping | ⚒️ | ⚒️ | ⚒️ | [❌][5162] [^1] | ⚒️ | [❌][5420] [^1] | ⚒️ | ⚒️ | ⚒️ | +| RTC Timekeeping | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | | SDIO host | ⚒️ | | | | | | | | ⚒️ | | SDIO slave | ⚒️ | | | [❌][5169] [^1] | ⚒️ | [❌][5417] [^1] | | | | | SHA | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | ⚒️ | @@ -143,7 +143,6 @@ For help getting started with this HAL, please refer to [The Rust on ESP Book] a [5417]: https://github.com/esp-rs/esp-hal/issues/5417 [5418]: https://github.com/esp-rs/esp-hal/issues/5418 [5419]: https://github.com/esp-rs/esp-hal/issues/5419 -[5420]: https://github.com/esp-rs/esp-hal/issues/5420 [5421]: https://github.com/esp-rs/esp-hal/issues/5421 [5422]: https://github.com/esp-rs/esp-hal/issues/5422 [5423]: https://github.com/esp-rs/esp-hal/issues/5423 diff --git a/esp-metadata/devices/esp32c61.toml b/esp-metadata/devices/esp32c61.toml index e97e2d6ec9a..f90b62ae7d3 100644 --- a/esp-metadata/devices/esp32c61.toml +++ b/esp-metadata/devices/esp32c61.toml @@ -412,7 +412,6 @@ support_status = { status = "not_supported", issue = 5418 } support_status = { status = "not_supported", issue = 5419 } [device.lp_timer] -support_status = { status = "not_supported", issue = 5420 } [device.sleep] support_status = { status = "not_supported", issue = 5424 } From 64e15613e90feccc97740ebf4cd1ba5b29967043 Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov Date: Mon, 27 Apr 2026 16:19:02 +0200 Subject: [PATCH 3/4] changelog entry(ies) --- esp-hal/CHANGELOG.md | 1 + esp-metadata/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index a22238f050a..6d7c9808128 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- C5 and C61: Enable RTC timekeeping (#5449) - C61: usb-serial-jtag and debug-assist (#5427) - C61: dedicated gpio (#5426) diff --git a/esp-metadata/CHANGELOG.md b/esp-metadata/CHANGELOG.md index 9e79c9f6233..2546e19971b 100644 --- a/esp-metadata/CHANGELOG.md +++ b/esp-metadata/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- C5 and C61: Enable RTC timekeeping (#5449) ### Changed From 6bf7ceb2ba07a85d37ea4b7e36f65417bb90c9dd Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov Date: Mon, 27 Apr 2026 17:11:41 +0200 Subject: [PATCH 4/4] enable `lp_timer` qa-test for C5 and C61 --- qa-test/src/bin/lp_timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa-test/src/bin/lp_timer.rs b/qa-test/src/bin/lp_timer.rs index 7f5371548cf..6ba23362d0f 100644 --- a/qa-test/src/bin/lp_timer.rs +++ b/qa-test/src/bin/lp_timer.rs @@ -1,6 +1,6 @@ //! Demonstrates clock setup and LP_TIMER's accuracy -//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 +//% CHIPS: esp32 esp32c2 esp32c3 esp32c5 esp32c6 esp32c61 esp32h2 esp32s2 esp32s3 #![no_std] #![no_main]