Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DRAFT: Use automatic light sleep for ESP32 alarm sleep#9559

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
EternityForest wants to merge4 commits intoadafruit:main
base:main
Choose a base branch
Loading
fromEternityForest:auto-light-sleep

Conversation

@EternityForest
Copy link

Follows up on the conversation in#9463 and in Discord.

Draft PR, should be working but not tested in every possible way, posting for discussion purposes.

What this patch does:

  • On ports without native USB, don't consider the console connected once there have been no new bytes for a while
  • Configure UART wakeup(Note: the initial few bytes will always be lost with the hardware UART in sleep)
  • Enables tickless idle but does not actually use it in normal operation
  • When the user does a sleep until alarms, it allows the ESP-IDF to manage sleep/wake/CPU speed for that period

Copy link
Member

@tannewttannewt left a comment

Choose a reason for hiding this comment

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

Thanks for the initial PR!

Any idea of what functionality will need to disable this light sleep and can you add the "disable" calls for that? Adding it here will make it easier when we find other things impacted by this change.


#ifCIRCUITPY_CONSOLE_UART
return true;
if (_console_uart_rx_timestamp&& (_console_uart_rx_timestamp+ (60*1024*5)>port_get_raw_ticks(NULL))) {
Copy link
Member

Choose a reason for hiding this comment

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

Please breakout the 60 * 1024 * 5 into a macro that is documented with what it means.

@EternityForest
Copy link
Author

EternityForest commentedAug 27, 2024 via email

I'm not exactly sure what would need to disable it, but I think it shouldbe handled already by the ESP-IDF's wake locks API, the ESP won't sleep ifone of those is held
On Tue, Aug 27, 2024, 2:56 PM Scott Shawcroft ***@***.***> wrote: ***@***.**** requested changes on this pull request. Thanks for the initial PR! Any idea of what functionality will need to disable this light sleep and can you add the "disable" calls for that? Adding it here will make it easier when we find other things impacted by this change. ------------------------------ In supervisor/shared/serial.c <#9559 (comment)> : > @@ -175,7 +180,9 @@ bool serial_connected(void) { #endif #if CIRCUITPY_CONSOLE_UART - return true; + if (_console_uart_rx_timestamp && (_console_uart_rx_timestamp + (60 * 1024 * 5) > port_get_raw_ticks(NULL))) { Please breakout the 60 * 1024 * 5 into a macro that is documented with what it means. — Reply to this email directly, view it on GitHub <#9559 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAFZCH55QQ73PD2FN6GWX3LZTTRXNAVCNFSM6AAAAABNA32CRSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRUGQZTMNJUGU> . You are receiving this because you authored the thread.Message ID: ***@***.***>

@tannewt
Copy link
Member

I'm not exactly sure what would need to disable it, but I think it should be handled already by the ESP-IDF's wake locks API, the ESP won't sleep if one of those is held

Ah ok. So we rely on the IDF to prevent sleep if we have things going on? Sounds good to me.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tannewttannewttannewt requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@EternityForest@tannewt

[8]ページ先頭

©2009-2025 Movatter.jp