By reading the header file, it seems to me:
1. We call esp_ota_begin() to start the beginning of an OTA image write
2. We receive data that is part of the image
3. We call esp_ota_write() to write the data we just read
4. Go back to 2 while there is more of the image to receive over the network
5. We call esp_ota_end() to flag the end of the OTA image write
6. We call esp_ota_set_boot_partition() to specify which partition will be booted on next reboot
For the sake of a working discussion (and the above may not be accurate), lets assume this to be correct and see what questions come from contemplating and testing the above.
Hi,
I have created one sample application in which I am getting firmware image using web socket and storing that image into other than OTA locations.
After that, we have created 2 OTA partitions using make menuconfig command which are OTA_0 at 0x110000 and OTA_1at 0x210000 locations.
And we have created OTA based firmware update application like steps you provided 1) OTA begin 2) write OTA data 3) End OTA and then set boot partition to boot from. But, there are also some other tasks as well as timers are already running in parellel apart from firmware update task.
Does it will create any problem like panic or illegal instruction type of issue while all timers and other tasks are running in parellel to firmware update OTA task as we are facing this type of issue while updating image from default location to OTA_0 partition.
So, I have disabled all other tasks and timers and it was working fine without any issue.
So, do you have idea for this type issue or its known issue?
Please let me know your feedback or suggestions for this..