mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/bt_sleep_state_check_assert_failed' into 'master'
Bluetooth: fixed the assertion failure in checking hardware sleep state during wake-up Closes BT-1705 See merge request espressif/esp-idf!14127
This commit is contained in:
commit
d674c94f2e
@ -710,10 +710,6 @@ static void btdm_sleep_exit_phase3_wrapper(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(btdm_sleep_clock_sync()) {
|
||||
ESP_LOGE(BTDM_LOG_TAG, "sleep eco state err\n");
|
||||
assert(0);
|
||||
}
|
||||
if (btdm_controller_get_sleep_mode() == ESP_BT_SLEEP_MODE_1) {
|
||||
if (s_lp_stat.phy_enabled == 0) {
|
||||
esp_phy_enable();
|
||||
@ -728,6 +724,12 @@ static void btdm_sleep_exit_phase3_wrapper(void)
|
||||
esp_timer_stop(s_btdm_slp_tmr);
|
||||
s_lp_stat.wakeup_timer_started = 0;
|
||||
}
|
||||
|
||||
// wait for the sleep state to change
|
||||
// the procedure duration is at micro-second level or less
|
||||
while (btdm_sleep_clock_sync()) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
static void IRAM_ATTR btdm_sleep_exit_phase0(void *param)
|
||||
|
@ -710,10 +710,6 @@ static void btdm_sleep_exit_phase3_wrapper(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
if(btdm_sleep_clock_sync()) {
|
||||
ESP_LOGE(BT_LOG_TAG, "sleep eco state err\n");
|
||||
assert(0);
|
||||
}
|
||||
if (btdm_controller_get_sleep_mode() == ESP_BT_SLEEP_MODE_1) {
|
||||
if (s_lp_stat.phy_enabled == 0) {
|
||||
esp_phy_enable();
|
||||
@ -728,6 +724,12 @@ static void btdm_sleep_exit_phase3_wrapper(void)
|
||||
esp_timer_stop(s_btdm_slp_tmr);
|
||||
s_lp_stat.wakeup_timer_started = 0;
|
||||
}
|
||||
|
||||
// wait for the sleep state to change
|
||||
// the procedure duration is at micro-second level or less
|
||||
while (btdm_sleep_clock_sync()) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
static void IRAM_ATTR btdm_sleep_exit_phase0(void *param)
|
||||
|
Loading…
x
Reference in New Issue
Block a user