-
Notifications
You must be signed in to change notification settings - Fork 7
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
ladislas/feature/deep sleep investigation #1101
Draft
ladislas
wants to merge
11
commits into
develop
Choose a base branch
from
ladislas/feature/deep-sleep-investigation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+365
−18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
ladislas
requested review from
HPezz and
YannLocatelli
and removed request for
HPezz
November 2, 2022 08:56
ladislas
force-pushed
the
ladislas/feature/deep-sleep-investigation
branch
from
November 2, 2022 13:24
81ac892
to
e141174
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1101 +/- ##
==========================================
Coverage ? 96.05%
==========================================
Files ? 133
Lines ? 3196
Branches ? 0
==========================================
Hits ? 3070
Misses ? 126
Partials ? 0
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ladislas
force-pushed
the
ladislas/feature/deep-sleep-investigation
branch
2 times, most recently
from
November 2, 2022 22:19
efb7534
to
7e58d73
Compare
SerialBuffer, by default, holds a lock on deepsleep preventing the system from deepsleeping to wait for incoming data, thus preventing the system from saving powser when needed. In our case, nothing is ever sent to the robot through UART, so input can be safely disabled. This has the effect to allow deep sleep when using LogKit. If at some point we would like to send data through UART, it can be enabled back on when needed. See link for more information: https://os.mbed.com/docs/mbed-os/v6.15/apis/power-management-sleep.html
This would allow us to turn off input and improve power saving
…o allow deep sleep
ladislas
force-pushed
the
ladislas/feature/deep-sleep-investigation
branch
from
November 3, 2022 14:09
a95edae
to
6683cb5
Compare
Kudos, SonarCloud Quality Gate passed! |
This was referenced Nov 7, 2022
This was referenced Nov 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR investigates the ability our system to enter deep sleep.
As of v1.2.0, LekaOS never enters deep sleep, keep the system in a high power consumption state which results in bad/degraded user experience:
Key findings
SerialBase/BufferedSerial
are preventing deep sleep (holding a lock on deep sleep) to be able to receive incoming data --> disablingstdio input
withenable_input(false)
removes the lock, thus allowing deep sleep. Drivers, libs impacted are:LogKit
'sdefault_serial
see spikembed_deep_sleep
CoreRFIDReader
'sserial
see spikelk_rfid
PwmOut
is also holding a lock on deep sleep, see https://github.com/ARMmbed/mbed-os/blob/4f156de4bff18a8e97af022d35635c6c833c7a28/drivers/source/PwmOut.cpp#L167-L178CorePwmOut
is used byCoreMotor
+CoreLCDDriverOTM8009A
--> callingsuspend/resume
should fix the issueTodo
suspend/resume
methodsis_suspended
logicenable/disable_input
methodsCoreBufferedSerial - implementnot needed anymoreis_input_enabled
logicDocumentation