![]() The bootloader checks for the ESP_OTA_IMG_PENDING_VERIFY state if it is set, then it will be written to ESP_OTA_IMG_ABORTED. This state means that the application is new and should be monitored for its first boot. The new application is successfully downloaded and esp_ota_set_boot_partition() function makes this partition bootable and sets the state ESP_OTA_IMG_NEW. The description of the rollback process when CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE option is enabled: Thus, a new application has only one attempt to boot successfully. It allows you to control the operability of the application during the boot phase. In this case, the application must confirm its operability by calling esp_ota_mark_app_valid_cancel_rollback() function, otherwise the application will be rolled back upon reboot. If CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE option is not enabled (by default), then the use of the following functions esp_ota_mark_app_valid_cancel_rollback() and esp_ota_mark_app_invalid_rollback_and_reboot() are optional, and ESP_OTA_IMG_NEW and ESP_OTA_IMG_PENDING_VERIFY states are not used.Īn option in Kconfig CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE allows you to track the first boot of a new application. Not be selected, and the state will change to ESP_OTA_IMG_ABORTED. In bootloader the state immediately changes to If CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE option is set it willīe selected only once. Restriction of selecting a boot app in bootloader States control the process of selecting a boot app: If the CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE option is set, and a reset occurs without calling either function then the application is rolled back. This application will not be selected by the bootloader for boot and will boot the previously working application. The application has critical errors and further work is not possible, a rollback to the previous application is required, esp_ota_mark_app_invalid_rollback_and_reboot() marks the running application with the state ESP_OTA_IMG_INVALID and reset. There are no restrictions on booting this application. The application works fine, esp_ota_mark_app_valid_cancel_rollback() marks the running application with the state ESP_OTA_IMG_VALID. When the rollback process is enabled and an OTA update provides a new version of the app, one of three things can happen: This feature allows you to roll back to the previous working application in case a new application has critical errors. The main purpose of the application rollback is to keep the device working after the update.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |