esp_ota_get_running_partition() function
Get partition info of currently running app This function is different to esp_ota_get_boot_partition() in that it ignores any change of selected boot partition caused by esp_ota_set_boot_partition(). Only the app whose code is currently running will have its partition information returned. The partition returned by this function may also differ from esp_ota_get_boot_partition() if the configured boot partition is somehow invalid, and the bootloader fell back to a different app partition at boot.
Return value
Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
esp_ota_get_running_partition() is called by 4 functions and calls 7 functions:
![]()
esp_ota_get_running_partition()
esp_ota_get_running_partition() reads 5 variables and writes 1 variable:
![]()
esp_ota_get_running_partition()