[FL-667] Power saving: deep sleep in tickless state (#300)
* SYSTEM: tickless mode with deep sleep. * Move FreeRTOS ticks to lptim2. * API: move all sumbodules init routines to one place. * Timebase: working lptim2 at tick source. * API Timebase: lp-timer routines, timer access safe zones prediction and synchronization. * FreeRTOS: adjust configuration for tickless mode. * NFC: support for tickless mode. * API Timebase: improve tick error handling in IRQ. * Apploader: use insomnia mode to run applications. * BLE: prevent sleep while core2 starting. * HAL: nap while in insomnia mode. Co-authored-by: coreglitch <mail@s3f.ru>
This commit is contained in:
		| @@ -8,6 +8,7 @@ | ||||
| #include "shci_tl.h" | ||||
| #include "stm32_lpm.h" | ||||
| #include "app_debug.h" | ||||
| #include <api-hal.h> | ||||
|  | ||||
| extern RTC_HandleTypeDef hrtc; | ||||
|  | ||||
| @@ -51,6 +52,7 @@ void APPE_Init() { | ||||
|   HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ | ||||
|  | ||||
|   // APPD_Init(); | ||||
|   api_hal_timebase_insomnia_enter(); | ||||
|  | ||||
|   appe_Tl_Init();	/* Initialize all transport layers */ | ||||
|  | ||||
| @@ -142,6 +144,7 @@ static void APPE_SysUserEvtRx( void * pPayload ) { | ||||
|   } else { | ||||
|     ble_glue_status = BleGlueStatusBroken; | ||||
|   } | ||||
|   api_hal_timebase_insomnia_exit(); | ||||
| } | ||||
|  | ||||
| /************************************************************* | ||||
|   | ||||
		Reference in New Issue
	
	Block a user