[FL-3226] Deep Sleep Idle (#2569)

* Improve RNG error handling
* Sync RTC shadow registers on Stop mode exit
* Implement working STOP2 mode
* Fix formatting
* FuriHal: disable SWD pins if debug is disabled
* Power: cleanup battery info view, handle zero current report from gauge
* Fbt: add command line argument for extra global defines
* FuriHal: cleanup debug defines in power and os, drop deep_insomnia counter.
* Add a setting to disable deep sleep
* Clean up furi_hal_power
* FuriHal,FapLoader,Debug: implement debug in stop mode, workaround resume in stop
* FuriHal: document OS and power subsystems debugging
* Furi: enable debug interface on crash

---------

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Georgii Surkov
2023-04-13 17:47:38 +03:00
committed by GitHub
parent 5d7bdca835
commit 37fb330b36
26 changed files with 246 additions and 120 deletions

View File

@@ -135,6 +135,7 @@ class FlipperAppStateHelper:
self.app_list_ptr = None
self.app_list_entry_type = None
self._current_apps: list[AppState] = []
self.set_debug_mode(True)
def _walk_app_list(self, list_head):
while list_head:
@@ -195,7 +196,7 @@ class FlipperAppStateHelper:
self.set_debug_mode(False)
def set_debug_mode(self, mode: bool) -> None:
gdb.execute(f"set variable fap_loader_debug_active = {int(mode)}")
gdb.execute(f"set variable furi_hal_debug_gdb_session_active = {int(mode)}")
# Init additional 'fap-set-debug-elf-root' command and set up hooks