I have come across this issue on OTA and need to know how to resolve it
I have a thing in the field on a network that takes a long time to assign an IP address in exceed of 30 seconds
I run the OTA update and all the data is received and the thing resets. The update is verified and banks are swapped as normal.
The new program then starts to run but after 30 seconds resets*. No IP address has been assign by the network at this point.
I can also replicate on my work network by running the update and when complete removing the network cable which then prevents an IP address being assigned, again after 30 seconds the thing reset.
Normally code will wait until a network connection is made without resetting.
The OTA demo is not running at the point of crashing , its just waiting until a connection is made.
many ideas
Simon H
I have modified ‘forever loops’ to be software resets
When the device receives the new firmware, the crypto signature is verified and device resets so that the bootloader boots the new image. This new image is in self-test and only committed when the device connects to the network and updates the job status as accepted. The OTA library has configurations set on how long this new image will be in self-test or roll back to the previous version. AWS IoT Over-the-air Update: Configurations . This is set to 16 seconds as default. You might also want to check if you have a watchdog timer enabled by bootloader and cancelled while committing the new image. You can change these timeout based on your application and how long the device should wait for connection before rolling back.
Yes it was the watchdog timer set to 32 seconds, which is the point at which devices resets, one more question if i change the watchdog to 64 seconds by changing WDTPS in both the bootloader and main applications will it use these values on an OTA update or the old values already in the device
Please also update the AWS IoT Over-the-air Update: Configurations which is used for software timer. Can you please share the repository/release you are using, is it the default port ? If you have updated in the main application the new configuration will be used when new image boots up in self-test. The bootloader is not updated in the default port we had in 202012.00 release for PIC32MZ. If the bootloader timer configuration is smaller you can use only for booting the new image till just before creating the connection and feed it again or load it with higher initial value depending on the timeout you need. If you just cancel it on the boot and before creating new connection the OTA library will still use the software timer to rollback to the previous version, but it is software timer.