-
Notifications
You must be signed in to change notification settings - Fork 221
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
ESP32-C6: make basic light sleep work #1720
ESP32-C6: make basic light sleep work #1720
Conversation
i2c_clock.set_i2c_master(true); | ||
let i2c_clock = i2c_clock; | ||
|
||
modem_clock_device_enable(i2c_clock, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in theory the ref-counting pattern is nice but if we do it we should do it for all clocks and for all chips (and it wasn't working correctly, didn't honor the initial state)
@@ -211,16 +133,21 @@ pub(crate) fn esp32c6_rtc_bbpll_configure_raw(_xtal_freq: u32, pll_freq: u32) { | |||
// WAIT CALIBRATION DONE | |||
while (i2c_mst_ana_conf0_reg_ptr.read_volatile() & I2C_MST_BBPLL_CAL_DONE) == 0 {} | |||
|
|||
// workaround bbpll calibration might stop early | |||
crate::rom::ets_delay_us(10); | |||
|
|||
// BBPLL CALIBRATION STOP | |||
i2c_mst_ana_conf0_reg_ptr.write_volatile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in ESP-IDF the order of operations is like this - doesn't seem to make a difference but maybe better to align it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
sleep_light
wasn't working for ESP32-C6. This fixes it.Testing
Change the
sleep_timer.rs
example to thisPower consumption will look like this