mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/vtasksteptick_assert_failed_issue_v5.1' into 'release/v5.1'
backport v5.1: fix the issue of esp32c6 enable light sleep, vTaskStepTick assert failed caused by wifi baseband sleep retention linked list See merge request espressif/esp-idf!25147
This commit is contained in:
commit
2c196590d3
@ -388,6 +388,8 @@ static uint32_t* s_mac_bb_pd_mem = NULL;
|
|||||||
static uint8_t s_macbb_backup_mem_ref = 0;
|
static uint8_t s_macbb_backup_mem_ref = 0;
|
||||||
/* Reference of powering down MAC and BB */
|
/* Reference of powering down MAC and BB */
|
||||||
static bool s_mac_bb_pu = true;
|
static bool s_mac_bb_pu = true;
|
||||||
|
#elif SOC_PM_MODEM_RETENTION_BY_REGDMA
|
||||||
|
static void *s_mac_bb_tx_base = NULL;
|
||||||
#endif // SOC_PM_MODEM_RETENTION_BY_BACKUPDMA
|
#endif // SOC_PM_MODEM_RETENTION_BY_BACKUPDMA
|
||||||
|
|
||||||
void esp_mac_bb_pd_mem_init(void)
|
void esp_mac_bb_pd_mem_init(void)
|
||||||
@ -407,7 +409,13 @@ void esp_mac_bb_pd_mem_init(void)
|
|||||||
[3] = { .config = REGDMA_LINK_CONTINUOUS_INIT(0x0b03, 0x600a7c00, 0x600a7c00, 53, 0, 0), .owner = BIT(0) | BIT(1) }, /* BB */
|
[3] = { .config = REGDMA_LINK_CONTINUOUS_INIT(0x0b03, 0x600a7c00, 0x600a7c00, 53, 0, 0), .owner = BIT(0) | BIT(1) }, /* BB */
|
||||||
[4] = { .config = REGDMA_LINK_CONTINUOUS_INIT(0x0b05, 0x600a0000, 0x600a0000, 58, 0, 0), .owner = BIT(0) | BIT(1) } /* FE COEX */
|
[4] = { .config = REGDMA_LINK_CONTINUOUS_INIT(0x0b05, 0x600a0000, 0x600a0000, 58, 0, 0), .owner = BIT(0) | BIT(1) } /* FE COEX */
|
||||||
};
|
};
|
||||||
esp_err_t err = sleep_retention_entries_create(bb_regs_retention, ARRAY_SIZE(bb_regs_retention), 3, SLEEP_RETENTION_MODULE_WIFI_BB);
|
esp_err_t err = ESP_OK;
|
||||||
|
_lock_acquire(&s_phy_access_lock);
|
||||||
|
s_mac_bb_tx_base = sleep_retention_find_link_by_id(0x0b01);
|
||||||
|
if (s_mac_bb_tx_base == NULL) {
|
||||||
|
err = sleep_retention_entries_create(bb_regs_retention, ARRAY_SIZE(bb_regs_retention), 3, SLEEP_RETENTION_MODULE_WIFI_BB);
|
||||||
|
}
|
||||||
|
_lock_release(&s_phy_access_lock);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
ESP_LOGW(TAG, "failed to allocate memory for WiFi baseband retention");
|
ESP_LOGW(TAG, "failed to allocate memory for WiFi baseband retention");
|
||||||
}
|
}
|
||||||
@ -425,7 +433,10 @@ void esp_mac_bb_pd_mem_deinit(void)
|
|||||||
}
|
}
|
||||||
_lock_release(&s_phy_access_lock);
|
_lock_release(&s_phy_access_lock);
|
||||||
#elif SOC_PM_MODEM_RETENTION_BY_REGDMA
|
#elif SOC_PM_MODEM_RETENTION_BY_REGDMA
|
||||||
|
_lock_acquire(&s_phy_access_lock);
|
||||||
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_WIFI_BB);
|
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_WIFI_BB);
|
||||||
|
s_mac_bb_tx_base = NULL;
|
||||||
|
_lock_release(&s_phy_access_lock);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user