mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
esp_wifi: add protection for mac reset
This commit is contained in:
@@ -507,15 +507,13 @@ static void IRAM_ATTR timer_arm_us_wrapper(void *ptimer, uint32_t us, bool repea
|
||||
|
||||
static void wifi_reset_mac_wrapper(void)
|
||||
{
|
||||
SET_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_WIFIMAC_RST);
|
||||
CLEAR_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_WIFIMAC_RST);
|
||||
periph_module_reset(PERIPH_WIFI_MODULE);
|
||||
}
|
||||
|
||||
static void IRAM_ATTR wifi_rtc_enable_iso_wrapper(void)
|
||||
{
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_mac_bb_power_down();
|
||||
SET_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_WIFIMAC_RST);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -523,8 +521,6 @@ static void IRAM_ATTR wifi_rtc_disable_iso_wrapper(void)
|
||||
{
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_mac_bb_power_up();
|
||||
SET_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_WIFIMAC_RST);
|
||||
CLEAR_PERI_REG_MASK(SYSCON_WIFI_RST_EN_REG, SYSTEM_WIFIMAC_RST);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user