wifi/bt: fix part of modem module not reset when power up

This commit is contained in:
jingli
2022-08-29 22:02:40 +08:00
parent a2086ca355
commit 91b147c9da
11 changed files with 128 additions and 77 deletions

View File

@@ -89,11 +89,19 @@ void IRAM_ATTR esp_restart_noos(void)
WRITE_PERI_REG(GPIO_FUNC5_IN_SEL_CFG_REG, 0x30);
// Reset wifi/bluetooth/ethernet/sdio (bb/mac)
SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG,
SYSTEM_BB_RST | SYSTEM_FE_RST | SYSTEM_MAC_RST |
SYSTEM_BT_RST | SYSTEM_BTMAC_RST | SYSTEM_SDIO_RST |
SYSTEM_SDIO_HOST_RST | SYSTEM_EMAC_RST | SYSTEM_MACPWR_RST |
SYSTEM_RW_BTMAC_RST | SYSTEM_RW_BTLP_RST | SYSTEM_BLE_REG_RST | SYSTEM_PWR_REG_RST | SYSTEM_BB_REG_RST);
SET_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, SYSTEM_WIFIBB_RST | \
SYSTEM_FE_RST | \
SYSTEM_WIFIMAC_RST | \
SYSTEM_BTBB_RST | \
SYSTEM_BTMAC_RST | \
SYSTEM_SDIO_RST | \
SYSTEM_EMAC_RST | \
SYSTEM_MACPWR_RST | \
SYSTEM_RW_BTMAC_RST | \
SYSTEM_RW_BTLP_RST | \
SYSTEM_RW_BTMAC_REG_RST | \
SYSTEM_RW_BTLP_REG_RST | \
SYSTEM_BTBB_REG_RST);
REG_WRITE(SYSTEM_CORE_RST_EN_REG, 0);
// Reset timer/spi/uart