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.
Dependencies
Description
Add explanations how to use the new sleep tracing mechanism.
Content
After merging #423 and rebase, this will look like:
Sleep tracing
Mbed OS can help you to understand the sleep patterns of your device, specifically who is holding a sleep locks preventing your board to enter the deep sleep. To enable the tracing, all you need to do is to define
MBED_SLEEP_TRACING_ENABLED
macro. You can do it by modifying yourmbed_app.json
config file or appending-DMBED_SLEEP_TRACING_ENABLED
tombed compile
command.Mbed OS will print sleep traces on the standard output, which by default is UART. Some of the events that we track:
LOCK: <file name>, ln: <line in file>, lock count: <number of locks held>
UNLOCK: <file name>, ln: <line in file>, lock count: <number of locks held>
Example trace can look like:
Note: Sleep tracing is a debug feature and should only be enabled during development cycle. Its heavy use of UART can affect the device performance.
CC: @scartmell-arm