esp32c6: add bootloader support

This commit is contained in:
wuzhenghui
2022-07-08 16:46:11 +08:00
committed by Song Ruo Jing
parent a9f15d1556
commit 1c820b0a6d
22 changed files with 922 additions and 28 deletions

View File

@@ -429,7 +429,11 @@ esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length)
return ESP_FAIL;
}
#if CONFIG_IDF_TARGET_ESP32C6 // TODO: IDF-5653
wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &LP_WDT};
#else
wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL};
#endif
for (size_t i = 0; i < data_length; i += FLASH_SECTOR_SIZE) {
wdt_hal_write_protect_disable(&rtc_wdt_ctx);
wdt_hal_feed(&rtc_wdt_ctx);