Came across an issue that popped up with esp devkit.
Esp32 reset is observed when called get_boot_partition after setting new boot partition, precisely it happens inside the spi_mmap() API when trying to map ota partition. However if before calling set_boot_partition if get_boot_partition is called it works correctly.
I am using partition table
0 nvs WiFi data 01 02 00009000 00004000
1 otadata OTA data 01 00 0000d000 00002000
2 phy_init RF data 01 01 0000f000 00001000
3 factory factory app 00 00 00010000 00040000
4 ota_0 OTA app 00 10 00050000 00040000
5 ota_1 OTA app 00 11 00090000 00040000
const esp_partition_t* get_boot_partition = esp_ota_get_boot_partition(); ------->>>> This API works correctly
if (NULL != boot_partition) {
ESP_LOGI(TAG, "Partition Label %-16s Type %02x Subtype %02x Address %08x Size %08x", get_boot_partition->label,
get_boot_partition->type, get_boot_partition->subtype, get_boot_partition->address,
get_boot_partition->size);
}
const esp_partition_t* update_partition = esp_ota_get_next_update_partition(esp_ota_get_running_partition());
if (NULL != update_partition) {
ESP_LOGI(TAG, "Partition Label %-16s Type %02x Subtype %02x Address %08x Size %08x", update_partition->label,
update_partition->type, update_partition->subtype, update_partition->address, update_partition->size);
}
esp_err_t next_update_partition = esp_ota_set_boot_partition(update_partition);
if (ESP_OK == next_update_partition) {
ESP_LOGI(TAG, "Partition Label %-16s Type %02x Subtype %02x Address %08x Size %08x", update_partition->label,
update_partition->type, update_partition->subtype, update_partition->address, update_partition->size);
}
const esp_partition_t* get_boot_partition = esp_ota_get_boot_partition(); ------->>>> RESETS at this location internally in the spi_mmap() --> static void IRAM_ATTR spi_flash_disable_cache( cpuid (for APP_CPU), *saved_state) API
if (NULL != boot_partition) {
ESP_LOGI(TAG, "Partition Label %-16s Type %02x Subtype %02x Address %08x Size %08x", get_boot_partition->label,
get_boot_partition->type, get_boot_partition->subtype, get_boot_partition->address,
get_boot_partition->size);
}
Esp32 reset observed when called get_boot_partition after setting new boot partition
-
- Posts: 1
- Joined: Tue Nov 16, 2021 12:09 pm
Who is online
Users browsing this forum: No registered users and 124 guests