-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Investigate supporting power management in arduino-esp32 (DFS + tickless idle) #6563
Comments
just want to pump this up , is there anyone working on this ? it has been a long while :) |
that would be great, I am interested in both low power WIFI and BLE via arudino. |
I've added arduino core and some of the arduino libs (OneWire, DallasTemperature) as a components to ESP-IDF. On 10..160 MHz range started to observe Serial log
|
Which is totally expected as below 80 MHz the clock source is likely to change from PLL_CLK to XTAL_CLK or RC_FAST_CLK. N.B. It might be possible this "80 MHz" threshold differs among ESP32-variants as the ESP32-C2 for example does have a clock based on multiples of 60 MHz. I can imagine the issues you saw with serial also depend on the used baud rate as not every baud rate can be perfectly matched with an integer factor from each clock frequency. |
Yep, below 80 MHz APB starts to change also. However Serial itself keeps working even on stable 10 MHz without DFS (mostly, i've experienced some problems with Serial and SIM800 modem, characters were lost. Had to rise freq to 20 MHz to keep it stable). For DFS-related issues I assume the problems begin when (the frequency) switching occurs in the middle of processing a Serial buffer.
not sure what is this. Does the Arduino core have any notifications on clocks change? |
A few weeks ago I was looking into the wrongly reported APB frequency on an ESP32-C2 and then noticed some code in IDF which can send notifications on changes in these frequencies, but no code in Arduino to act on it. |
For BLE power consumption testing I've used a simple listener with interval 150 and window 75. Of course windows/interval ratio directly affects how much power would be needed for the radio. For the ESP32-S3 (DevKit with power LED cut off) options are better, light sleep works ok for both Main XTAL and Internal 150 KHz oscillator.
However the internal one accuracy is lower: |
@TD-er i think we can make UART work with DFS by selecting it's clock source from the default (APB) to RC_FAST/XTAL for S3 or UART_SCLK_REF_TICK for ESP32. At least it started printing large amounts without garbage for my S3 with DFS set to 10..160 MHz. However on S3 I'm facing another problem: sometimes assert |
Doesn't really ring a bell, like I haven't seen it before. My first instinct would be to check if Is the baud rate still correct? |
|
Hmm interesting. Maybe handling all those extra GPIO's takes some extra steps or perhaps things have been split into different (power) domains which need to be kept in sync? |
Not sure, I'm rather at level 'compile |
OK, if you're not using Serial2, then it is probably unrelated, but just for completeness, this is the issue I was referring to: |
Seems it has something to do with BLE, because once I've disabled listener - that assert stopped annoying. |
here was a mention that with a @igrr @TD-er I'm going to prepare 2 separate PRs.
another for:
First one is relatively safe to enable, peripherals are somewhat aware of a lightsleep and can put locks if necessary to prevent sleeping in the middle of important stuff like transactions. Timing as well as WiFi, BLE, SPI, I2C seems to work OK with automatic lightsleep. Not sure if update |
Seems we've been unblocked with a IDFGH-11870 completed. Will check those changes out and continue working on a PR for a PowerManagement support. |
needs to be first backported to 5.1 and 5.3 |
Related area
Power management
Hardware specification
All ESP32 series chips
Is your feature request related to a problem?
Recently a community member has mentioned that the current consumption of ESP32 connected to Wi-Fi is too high. While it is possible to reduce current consumption with ESP-IDF, this option is not accessible to Arduino users.
Describe the solution you'd like
To reduce current consumption in Wi-Fi connected state, several things are required:
Describe alternatives you've considered
Keep not supporting DFS and tickless idle in Arduino. But then everyone keeps thinking that it's not possible to have Wi-Fi connection with lower average current.
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: