diff options
| author | JF <jf@codingfield.com> | 2020-01-05 11:09:07 +0100 |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-01-05 11:09:07 +0100 |
| commit | bbe4e500c3a972146d834d21dc355b8509f88342 (patch) | |
| tree | 780ccd768997f93dd3fdc4db7d612e610bfb3bc0 /src/Logging/NrfLogger.cpp | |
| parent | 7688f468988ed26f522170bf0a5237ad974be02e (diff) | |
Improve power consumption and SLEEP mode :
- Disable IDLE hook (it would wake the device up as soon as possible).
- Logger task sleep for 100ms (disable logging for better battery life)
- Logging is disabled by default
- Apply fix for ERRATA 87 (clear FPU interrupt before going to sleep). Ports files from FreeRTOS are now in the sources (they where in the SDK before)
Diffstat (limited to 'src/Logging/NrfLogger.cpp')
| -rw-r--r-- | src/Logging/NrfLogger.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Logging/NrfLogger.cpp b/src/Logging/NrfLogger.cpp index 06639401..1c47a108 100644 --- a/src/Logging/NrfLogger.cpp +++ b/src/Logging/NrfLogger.cpp @@ -21,7 +21,7 @@ void NrfLogger::Process(void*) { NRF_LOG_INFO("Logger task started!"); while (1) { NRF_LOG_FLUSH(); - vTaskSuspend(nullptr); + vTaskDelay(100); // Not good for power consumption, it will wake up every 100ms... } } |
