Mac BB power down in light sleep

components/bt: Do not use feature: timer support isr dispatch method

disable controller after wake up finished.

protect critical section of power down

choose clk in sleep

components/coex: mac bb power down in light sleep

components/coex: Macro changed

components/os: protect reserved interrupt number

update phy to phy_version 300,6e46ba7,Jan 25 2021

some bugfix
This commit is contained in:
baohongde
2021-01-28 22:28:04 +08:00
parent ee480b7776
commit eef66789d4
15 changed files with 327 additions and 91 deletions

View File

@@ -271,8 +271,6 @@ void esp_mac_bb_pd_mem_init(void)
IRAM_ATTR void esp_mac_bb_power_up(void)
{
uint32_t level = phy_enter_critical();
if (s_mac_bb_pd_mem != NULL && s_mac_bb_pd_ref == 0) {
esp_phy_common_clock_enable();
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);
@@ -283,13 +281,13 @@ IRAM_ATTR void esp_mac_bb_power_up(void)
esp_phy_common_clock_disable();
}
s_mac_bb_pd_ref++;
phy_exit_critical(level);
}
IRAM_ATTR void esp_mac_bb_power_down(void)
{
uint32_t level = phy_enter_critical();
if (s_mac_bb_pd_ref == 0) {
return;
}
s_mac_bb_pd_ref--;
if (s_mac_bb_pd_mem != NULL && s_mac_bb_pd_ref == 0) {
@@ -299,8 +297,6 @@ IRAM_ATTR void esp_mac_bb_power_down(void)
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);
esp_phy_common_clock_disable();
}
phy_exit_critical(level);
}
#endif