Commit Graph

22 Commits (5d8570be39bcb6ce8807f45c3a6d558201a0de84)

Author SHA1 Message Date
Bartek Szatkowski efd307fa79 Rename new occurrences of LOWPOWERTIMER to LPTICKER 2018-05-25 12:33:43 -05:00
Senthil Ramakrishnan 5ef6728c08 Splitting MBED_ERROR macros to support ones with/without error value argument 2018-05-23 12:21:28 -05:00
Senthil Ramakrishnan d4fe75731d Adding mbed prefixes to all macros and functions to avoid namespace conflicts 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan 147d9cac4e Test application/cases optimization for some low memory targets, macro changes and test fixes 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan 2e28dd95e1 Change set_error/set_error_fatal to warning/error, add itm support and other changes 2018-05-23 12:21:08 -05:00
Senthil Ramakrishnan 9041b475c6 Error handling/logging implementation and tests 2018-05-23 12:21:07 -05:00
Deepika 029237b683 Addressed review comments
1. LP ticker limiation note
2. Use read_us in mbed_uptime function
3. Doxygen recommendations
4. Use us_timestamp_t instead uint64_t
5. Astyle changes
2018-05-15 11:36:08 -05:00
deepikabhavnani 3420ff7f9c CPU statistics addition
API to get CPU stats like sleep/deepsleep time, uptime and idle time.
These can be used by application to know the CPU Usage runtime.
2018-05-15 11:20:52 -05:00
Steven Cartmell 9a0e8797b9 Refactor sleep tracing driver identifier to be pointer to the driver filepath.
The use of __FILE__ macro to get a usable identifier from the driver path
causes the path of the file to be stored in the .text region of the binary.
Given that this remains for the entire duration of the program, storing a
pointer to this string as an identifier is more efficient than copying the
contents of the string during lookup/insertion.
2018-03-15 17:23:36 +00:00
Steven Cartmell bd63f93984 Replace runtime strip_path function with compiler intrinsic equivalents
Sleep manager tracing strips the path from filenames and uses the result as an
identifier to track drivers that unlock/lock sleep tracing. Replace the function
that strips the path from the string, replace this function with a new macro,
__FILENAME__ which performs the same action in a compiler specific manner.

- GCC_ARM, use __builtin_strrchr which is optimized out at compile time.
- ARM, use __MODULE__ which returns the filename without path.
- IAR, specifiy the --no_path_in_file_macros compiler flag.
2018-03-15 15:49:42 +00:00
Bartek Szatkowski d6f57bc3e8 Fix review comments and merge issues 2018-03-02 00:29:14 +00:00
Steven Cartmell 206cc299e0 Fix merge conflict mishap 2018-03-01 17:33:21 +00:00
Steven Cartmell fed5115624 Return pointer to sleep tracker array element instead of an index 2018-03-01 17:25:33 +00:00
Steven Cartmell 076548aa6b Split find/insert sleep tracker function into two seperate functions.
Throw an error when trying to unlock driver that was not previously locked.
2018-03-01 17:25:33 +00:00
Steven Cartmell bd23625d23 Rename SLEEP_STATS_ENABLED to SLEEP_TRACING_ENABLED 2018-03-01 17:25:33 +00:00
Steven Cartmell 5a4027b71d Remove newline printf from sleep manager 2018-03-01 17:25:15 +00:00
Steven Cartmell 21e5f1134d Remove '_PACKED' keyword from sleep statistic structure 2018-03-01 17:25:15 +00:00
Steven Cartmell 74bdf1c3a3 Rename SLEEP_PROFILING_ENABLED to MBED_SLEEP_STATS_ENABLED 2018-03-01 17:25:15 +00:00
Steven Cartmell 0f6b73ae0f Add optional tracing to sleep manager lock/unlock
Add tracing output to console to track when drivers lock and unlock deep
sleep. Tracing output is enabled by configuring the
'SLEEP_PROFILING_ENABLED' at compile time.

- Wrapped sleep_manager_lock/sleep_manager_unlock in a macro to
conditionally call tracing functions when 'SLEEP_PROFILING_ENABLED' is
set.
- Define a global structure to track driver names and how many locks
they hold in the sleep manager.
2018-03-01 17:24:53 +00:00
Bartek Szatkowski 4cb47df40a Add system_reset() function to Mbed OS 2018-02-28 16:42:34 +00:00
Martin Kojtal fcdb04351f Sleep: add deepsleep locks for !DEVICE_SLEEP
If a target do not support sleep (no DEVICE_SLEEP defined),
we provide empty deep sleep locking.
2017-09-07 15:35:04 +01:00
Martin Kojtal cb4e9b32a2 Sleep HAL: add sleep manager API
Sleep manager provides API to lock/unlock deepsleep. This API allows a user to
control deep sleep.

This API should be done via atomic operations (to be IRQ/thread safe).
2017-09-07 15:34:47 +01:00