Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5b402d2
Added capture channel and capture timer
Alex3404 Mar 28, 2026
01f878e
Update mod.rs
Alex3404 Mar 28, 2026
74bfcad
Capture update
Alex3404 Mar 29, 2026
ce58b75
Updated timer sync configurations
Alex3404 Mar 29, 2026
e580a8a
Finished sync implementation
Alex3404 Mar 29, 2026
cf94429
Fixed uncompilable code
Alex3404 Mar 30, 2026
7387a28
Update Cargo.toml
Alex3404 Mar 30, 2026
47058eb
Update sync.rs
Alex3404 Mar 30, 2026
848a5e8
Interrupt Handler
Alex3404 Mar 30, 2026
0c92475
Updated documentation added some new feactures
Alex3404 Mar 31, 2026
ddd7bb2
More changes
Alex3404 Apr 2, 2026
dd42b2b
Updateded esp-metadata for mcpwm capabilities.
Alex3404 Apr 2, 2026
e1954c2
Changes
Alex3404 Apr 2, 2026
1c48e3a
Allowing timer to have a default config to allow starting without a s…
Alex3404 Apr 3, 2026
7536da6
Added some nice public api types
Alex3404 Apr 9, 2026
43a6172
Comments and updating capture API names
Alex3404 Apr 10, 2026
c2fa021
Delete build_all.ps1
Alex3404 Apr 10, 2026
a2aaa6b
Fixed formatting, typos, comment docs
Alex3404 Apr 10, 2026
7143a91
Merge branch 'main' of https://github.com/Alex3404/esp-hal-mcpwm-cap
Alex3404 Apr 10, 2026
3cc7072
Merge remote-tracking branch 'upstream/main'
Alex3404 Apr 10, 2026
cd95646
Update _build_script_utils.rs
Alex3404 Apr 10, 2026
be9a6e4
Fix typo in MCPWM capabilities comment
Alex3404 Apr 10, 2026
6cd9d00
Update temp_sensor support status in esp32c5.toml
Alex3404 Apr 10, 2026
b2a39d0
Fix typo in MCPWM capabilities comment
Alex3404 Apr 10, 2026
d6d474b
Update order of device.temp_sensor
Alex3404 Apr 10, 2026
acf6119
Fixed typos, updated docs, fixed BlockGuard.
Alex3404 Apr 10, 2026
3d30753
Remove unexpected_cfgs lint configuration
Alex3404 Apr 10, 2026
b8abff4
Add warning for unexpected_cfgs lint in Cargo.toml
Alex3404 Apr 10, 2026
2b9cfd9
Update MCPWM Timer method descriptions
Alex3404 Apr 10, 2026
51ffc32
Updated doc for timer
Alex3404 Apr 10, 2026
c8f3da7
Removed PWM::State
Alex3404 Apr 10, 2026
2a5c92d
Update cargo.toml, and docs
Alex3404 Apr 10, 2026
6a53807
Added device.mcpwm configurations to esp-metadata
Alex3404 Apr 10, 2026
df1c237
Whoops forgot to remove for esp32s3 chip
Alex3404 Apr 10, 2026
99c9974
Fixed typos and referencing wrong peripheral
Alex3404 Apr 10, 2026
a852e89
Additional Checks for Illegal HW States
Alex3404 Apr 24, 2026
5a52902
Cleaned up capture
Alex3404 Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Cache configuration options for ESP32-S2 (#5306)
- C5: Add PSRAM support (#5317)
- C61: Add PSRAM support (#5325)
- MCPWM: Add external sync line and timer sync out support. (#5344)
- MCPWM: Add capture channel and timer support. (#5344)
- MCPWM: Added `esp_hal::mcpwm::timer::Timer::apply_config` to apply a config to a timer. (#5344)

### Changed

Expand Down Expand Up @@ -101,6 +104,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `esp_hal::efuse::chip_revision` has been marked stable (#5287)
- `esp_hal::efuse::chip_revision` now returns `ChipRevision` (#5287)
- DMA buffers can now be created using empty buffer slices (#5266)
- MCPWM: `esp_hal::mcpwm::timer::Timer::start` is now parameterless. Instead, use `esp_hal::mcpwm::timer::Timer::apply_config` to apply a config to a timer. (#5344)
- MCPWM: timers default to the config given by `PeripheralClockConfig::timer_clock_default()`. (#5344)

### Fixed

Expand Down
21 changes: 12 additions & 9 deletions esp-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,18 @@ ufmt-write = { version = "0.1", optional = true }
# IMPORTANT:
# Each supported device MUST have its PAC included below along with a
# corresponding feature.
esp32 = { version = "0.39", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32c2 = { version = "0.28", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32c3 = { version = "0.31", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32c5 = { version = "0.1", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32c6 = { version = "0.22", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32c61 = { version = "0.1", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32h2 = { version = "0.18", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32s2 = { version = "0.30", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }
esp32s3 = { version = "0.34", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "879efa6" }

## Once (#415) pull request is accepted update the commit hash to
## point to the latest commit on the main branch of esp-pacs
Comment on lines +106 to +107
esp32 = { version = "0.39", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32c2 = { version = "0.28", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32c3 = { version = "0.31", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32c5 = { version = "0.1", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32c6 = { version = "0.22", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32c61 = { version = "0.1", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32h2 = { version = "0.18", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32s2 = { version = "0.30", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }
esp32s3 = { version = "0.34", features = ["critical-section", "rt"], optional = true, git = "https://github.com/esp-rs/esp-pacs", rev = "64db7c2018e25b0f5084f62a1c77b77015be237a" }

[target.'cfg(target_arch = "riscv32")'.dependencies]
riscv = { version = "0.15.0" }
Expand Down
17 changes: 17 additions & 0 deletions esp-hal/MIGRATING-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,20 @@ expensive.
-let revision = chip_revision();
+let revision = chip_revision().combined();
```

## MCPWM changes
- The `Timer::start` method is now parameterless and doesn't take in a `TimerClockConfig`.
Instead, use `Timer::apply_config` method to set the config for the `mcpwm::Timer`.
- `Timer::start` starts with the configured `StopCondition` rather than being restricted to
running till `Timer::stop` is called.
- Timers now have a default configuration when you create a MCPWM instance via `McPwm::new`.

`TimerClockConfig` created by `timer_clock_with_frequency` and `timer_clock_with_prescaler`
will still default to `StopCondition::RunContinuously`. So, any existing code will only need
a simple change.

```diff
-mcpwm.timer0.start(timer_clock_cfg);
+mcpwm.timer0.apply_config(timer_clock_cfg);
+mcpwm.timer0.start();
```
Loading
Loading