Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU clock settings for ESP32 and ESP32-C3 #110

Merged
merged 2 commits into from
Jul 21, 2022

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Jul 21, 2022

This adds a way to configure the CPU clock for ESP32 and ESP32-C3 to 80,160 and for the ESP32 to 240 MHz.

Other chips will follow in separate PR(s)

Unfortunately, on the Xtensas we need a ROM function - maybe we can replace it someday but for now I think it's okay
Also, on ESP32 the code assumes 40MHz XTAL - it's the same thing that NuttX does so I guess it's fine for now and I we ever run into issues we can extend the code.

This is a non-breaking change.

I didn't add any examples for this since they would be pretty boring

esp-hal-common/src/clocks_ll/esp32.rs Outdated Show resolved Hide resolved
esp-hal-common/src/clocks_ll/esp32.rs Show resolved Hide resolved
esp-hal-common/src/clocks_ll/esp32.rs Outdated Show resolved Hide resolved
@bjoernQ bjoernQ requested a review from MabezDev July 21, 2022 15:46
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@MabezDev MabezDev merged commit faf6463 into esp-rs:main Jul 21, 2022
jrmoulton pushed a commit to jrmoulton/esp-hal that referenced this pull request Jul 30, 2022
* CPU clock settings for ESP32 and ESP32-C3

* Minor improvements to the ESP32 clock setting code
@bjoernQ bjoernQ deleted the feature/cpu_clock_setting branch October 27, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants