Fix delay on esp32h2. (#1535)

* Fix delay on `esp32h2`

* Add changelog entry

* Enable `esp32h2` chip in `get_time` HIL test
This commit is contained in:
Kirill Mikhailov 2024-05-03 19:09:17 +02:00 committed by GitHub
parent 5a8c76ebdc
commit 209a82bdc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed ESP32 specific code for resolutions > 16 bit in ledc embedded_hal::pwm max_duty_cycle function. (#1441)
- Fixed division by zero in ledc embedded_hal::pwm set_duty_cycle function and converted to set_duty_hw instead of set_duty to eliminate loss of granularity. (#1441)
- Embassy examples now build on stable (#1485)
- Fix delay on esp32h2 (#1535)
### Changed

View File

@ -84,7 +84,11 @@ mod implementation {
// The average clock frequency is fXTAL_CLK/2.5, which is 16 MHz.
// The timer counting is incremented by 1/16 μs on each `CNT_CLK` cycle.
Self {
#[cfg(not(esp32h2))]
freq: HertzU64::MHz(clocks.xtal_clock.to_MHz() as u64 * 10 / 25),
#[cfg(esp32h2)]
// esp32h2 TRM, section 11.2 Clock Source Selection
freq: HertzU64::MHz(clocks.xtal_clock.to_MHz() as u64 * 10 / 20),
}
}

View File

@ -1,6 +1,6 @@
//! current_time Test
//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32s2 esp32s3
//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3
#![no_std]
#![no_main]