Skip to content

Commit

Permalink
Merge branch 'bugfix/vtasksteptick_assert_failed_issue' into 'master'
Browse files Browse the repository at this point in the history
fix the issue of esp32c6 enable light sleep, vTaskStepTick assert failed caused by wifi baseband sleep retention linked list

Closes WIFI-6173

See merge request espressif/esp-idf!25039
  • Loading branch information
jack0c committed Aug 2, 2023
2 parents 016cb6a + 6ba55e1 commit 1210a3e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/esp_phy/src/phy_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ static uint32_t* s_mac_bb_pd_mem = NULL;
static uint8_t s_macbb_backup_mem_ref = 0;
/* Reference of powering down MAC and BB */
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

void esp_mac_bb_pd_mem_init(void)
Expand All @@ -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 */
[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) {
ESP_LOGW(TAG, "failed to allocate memory for WiFi baseband retention");
}
Expand All @@ -425,7 +433,10 @@ void esp_mac_bb_pd_mem_deinit(void)
}
_lock_release(&s_phy_access_lock);
#elif SOC_PM_MODEM_RETENTION_BY_REGDMA
_lock_acquire(&s_phy_access_lock);
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_WIFI_BB);
s_mac_bb_tx_base = NULL;
_lock_release(&s_phy_access_lock);
#endif
}

Expand Down

0 comments on commit 1210a3e

Please sign in to comment.