]> granicus.if.org Git - esp-idf/commitdiff
reduce the minimum delay uncertainty of esp_timer for Bluetooth modem sleep from...
authorwangmengyang <wangmengyang@espressif.com>
Tue, 9 Apr 2019 09:06:16 +0000 (17:06 +0800)
committerbaohongde <baohongde@espressif.com>
Tue, 28 May 2019 11:56:31 +0000 (19:56 +0800)
components/bt/bt.c

index a4e813cf9b9f00a97b12fdd7cbf95184844d2069..96f968bc084387f907ec71bd63c9b8d9938f25ed 100644 (file)
@@ -818,7 +818,7 @@ static void btdm_sleep_enter_phase1_wrapper(uint32_t lpcycles)
     // start a timer to wake up and acquire the pm_lock before modem_sleep awakes
     uint32_t us_to_sleep = btdm_lpcycles_2_us(lpcycles);
 
-#define BTDM_MIN_TIMER_UNCERTAINTY_US      (1800)
+#define BTDM_MIN_TIMER_UNCERTAINTY_US      (500)
     assert(us_to_sleep > BTDM_MIN_TIMER_UNCERTAINTY_US);
     // allow a maximum time uncertainty to be about 488ppm(1/2048) at least as clock drift
     // and set the timer in advance