esp-hal
esp-hal copied to clipboard
Clock tree rework tracking issue
This issue tracks the state of the clock tree rework.
- #4501
- Model clock trees of other chips
- #4517
- #4527
- [ ] ESP32-C5
- #4553
- [ ] ESP32-C61
- #4595
- [ ] ESP32-P4
- #4610
- #4633
- [ ] Model all peripheral clock sources
- #4660
- [ ] Model missing options in clock trees:
- ESP32:
- [ ] XTAL32K external oscillator option
- [ ] Configurable CK8M (RC_FAST_CLK)
- [ ] LOW_POWER_CLK
- ...
- ESP32:
- [ ] Detect XTL frequency on demand to support clocking CPU from RC_FAST_CLK
- Optimize away unnecessary reference counts
- [ ] Mark which clock nodes may be manually requested. Peripheral clocks should be, but out of system clocks probably only CPU.
- #4512
- [ ] ...?
- [ ] Add a bitmap that tracks active clocks (this can be postponed for upcoming low power rework)
- [x] Ensure code generator orders the initial configuration properly - #4536
- [x] Resolve #4440
- [ ] Decide whether caching the configuration is necessary or we can restore from hardware
- [ ] Decide whether we should cache active frequencies, or calculating them from the configurations is good enough
- [ ] We should likely cache, but we need to implement this in a way that does not require a critical section to read current frequencies. Since we expect a clock to not be running when configured, maybe that is enough to remain consistent?
- [ ] Implement equation-based PLL configuration (for ESP32 APLL)
- [x] Remove
ESP_HAL_CONFIG_XTAL_FREQUENCY- #4517 - [ ] Retain clock tree state between CPU-only resets
- [ ] Make configuration of always_on clocks and their dependencies mandatory
- [ ] Generate code directly into esp-hal, auto-update the list of handwritten functions
- [ ] Allow hand-written doc comments on clock nodes. Some types/config options need more explanation.
- [ ] Auto-generate
on_changedcallbacks - #4665
- #4667
- [ ] Improve clock node request/release API - https://github.com/esp-rs/esp-hal/pull/4647#discussion_r2619314443
- [ ] Add the ability to iterate over a mux's variants - https://github.com/esp-rs/esp-hal/pull/4663/changes/1e1388dbd47f94987d8db525f704529509ad54aa#diff-f4823be2299dcbe2eea9219ec3ce12b28541a53c0f91e7c80428813abed2b309R183-R185
I suppose, we can't make the RF clocks part of this due to the lack of info about them.
What we can read out of esp-idf is definitely in scope, and there's plenty there still.