Hi, Would you please check from where ESP32 restart API is called after completing firmware update? has it been managed with timer or just managed with normal API call?Ritu21 wrote: ↑Mon Jun 03, 2019 1:14 pmI haven't put any delay before rebooting the device. Do I need to add delay??
Actual application is server dependent, we get the time from server fro image update, then start rtos timer like this:
imageDownloadTimerHandle = xTimerCreate("imageDownloadTimer",pdMS_TO_TICKS(difference_in_time*1000),pdFALSE,(void*)1, vTimerCallbackApplyTimeExpired);
if(imageDownloadTimerHandle == NULL){
printf("Upload Timer Not Created\n");
}
else{
printf("Upload timer Started\n");
xTimerStart(imageDownloadTimerHandle, 0);
}
This is a callback function in which ota update function is called which I had already send you :
void vTimerCallbackApplyTimeExpired(xTimerHandle pxTimer1)
{
printf("Image Download Timer Expired\n");
ota_ImageUpdate();
printf("Image update finished\n");
}
Because, We are not using any OTA Image related APIs, We are using standard APIs to update image and we resolved this issue by putting some delay before ESP32 Restart or creating timer before ESP32 restart.