SWRA657 June 2020 CC3100 , CC3200
There are several options to implement file appending from the host application. All options are based on read → modify → write.
The assumption is that the host processor does not have enough resources to read the entire file to its space so the serial flash needs to be used as a mediator. The proposed approach is to keep two files that hold the same copy but in different time instances. The update/append is applied to the “older” instance (based on the “newer” instance) and upon successful update/append, it becomes the “newer” instance. So practically this approach implements rollback option in host level and does not make use of the file system fail-safe option.
The procedure for file appending is as follows:
Note that this approach does not use more space than a regular fail-safe file. The main difference is that this method implements fail-safe functionality in the host application. Additionally, write operations and flash erases are kept to a minimum.
Figure 4 illustrates the procedure: