Application Only Update
To update the application, the currently installed user application needs to start the DFU component from the Bluetooth Low Energy stack. The DFU component then starts the FOTA process and receives the new application image. The application image embeds the Build ID, calculated by the GNU linker over all symbols of fota.bin (see DFU Service Characteristics and Their Properties (table) for more about the FOTA stack Build ID). If this information does not match the installed Bluetooth Low Energy stack revision, the FOTA update is aborted. At this point the currently installed application is not destroyed.
If the FOTA Bluetooth Low Energy stack revision is compatible, the currently installed application is erased and the new image is programmed as the data comes in. When the whole image is programmed successfully, the DFU component marks the new application as valid and performs a restart. If the application update is aborted for any reason (power loss, for example), this causes the application area to contain an invalid image. The update process can be restarted from the beginning in this case, as the device still contains a valid FOTA Bluetooth Low Energy stack with the DFU component.