# General Usage

The bootloader must be loaded onto the device. An application to be used with the bootloader must have its start address in the location expected by the bootloader. See Overview for more information.

The "Standard Load and Update Sequence" figure illustrates the process for updating the application stored in flash.

Figure: Standard Load and Update Sequence

Each request has a frame consistency sequence on it (a simple CCITT CRC of the data in the request). A block load request includes the length of the application being loaded, and the CRC32 for the whole application. Once a number of blocks have been loaded, the CRC32 is checked to ensure that no frames have been lost or corrupted during transmission. At any stage, if an error is detected (e.g., a timeout or a bad frame), the load process terminates with an END message and an indicator of the reason for the failure.

The application used in the firmware update process must include bootloader.h and use SYS_BOOT_VERSION to set the version number of the new application. The bootloader references this information. See the Device Firmware Update (DFU) Guide for further information about this and other basic bootloader features. The standard bootloader sample application is described there, but much of the information is also applicable to the basic bootloader (non-secure) functionality of the secure bootloader operation.