- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is anyone concerned or looked at the endurance issue with OTA2 updates and the rewrites of the header?
During a update, the header is rewritten with status and bytesReceived for each write function call.
My image is 966KB and my downloads are received in 1KB chunks.
That means the header is read/erased/written nearly 944 times during one update.
The external flash specifies 100,000 cycles so this is only like 100 ota updates over the life of the product which maybe a lot but may not be depending on the life and application.
Would it make more sense to modify wiced_ota2_image.c, wiced_ota2_image_write_data function to not update the header and create a new function that will update the header when all bytes have been received?
Device: CYW43907
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The bytes_received in OTA image header is updated every time a sector is written into the flash. This helps us to track the bytes that are copied to the staged area. If the bytes_received variable is updated in the RAM and not written back to flash, we might loose the status of total bytes received in case of power loss/connection loss.
I agree with the fact that a partial image will anyhow not allow us to do an OTA update but it helps to debug the ota2 feature.
One possible suggestion to overcome flash endurance is to not re-write the OTA2 image header everytime and keep on updating it in RAM. On completion of entire download i.e., when total bytes_received >= image_size, the OTA2 header can be written back to the sflash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The bytes_received in OTA image header is updated every time a sector is written into the flash. This helps us to track the bytes that are copied to the staged area. If the bytes_received variable is updated in the RAM and not written back to flash, we might loose the status of total bytes received in case of power loss/connection loss.
I agree with the fact that a partial image will anyhow not allow us to do an OTA update but it helps to debug the ota2 feature.
One possible suggestion to overcome flash endurance is to not re-write the OTA2 image header everytime and keep on updating it in RAM. On completion of entire download i.e., when total bytes_received >= image_size, the OTA2 header can be written back to the sflash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAICT, this is a real bug that needs fix.
A combination of this issue and CYW43907 watchdog and OTA2_bootloader
I believe it's easy to damage the h/w.