25. SUOTA Memory Layout

When using the Software Update Over-the-Air mechanism, the non-volatile memory is organized into a number of sections. Each section is preceded by a header that indicates the type of data stored within. The memory layout is defined when using the SmartSnippets Toolbox Flash Programmer tool to create a multipart image file.

The default memory layout assumes the use of a 2Mb (256K byte) flash memory with the sections placed at the following locations:
_images/default-mem-layout.png

Figure 105 Default Memory Layout

25.1. Memory Section Headers

There two typs of Memory Headers.

25.1.1. Multipart Image Header

The multipart image header contains the following fields:
_images/multi-header.png

Figure 106 Multipart Image Header

  • Bytes 0-1: Signature field that identifies this header as a multipart image header.

  • Bytes 2-5: Reserved for future use.

  • Bytes 6-7: Size (in bytes) of the following image.

25.1.2. Single Image Header

The single image header contains the following fields:
_images/single-header.png

Figure 107 Single Image Header

  • Bytes 0-1: Signature field that identifies this header as a single image header.

  • Byte 2: Image valid flag (0x00 invalid, 0xAA valid).

  • Byte 3: Image identifier.

  • Bytes 4-7: Size (in bytes) of the following image.

  • Bytes 8-11: CRC of image.

  • Bytes 12-27: Image version information (ASCII string).

  • Bytes 28-31: Image timestamp.

  • Byte 32: Encryption flag (0x00 un-encrypted, 0x01 encrypted).

  • Bytes 33-63: Reserved for future use.

25.1.3. Product Header

The product header contains the following fields:
_images/product-header.png

Figure 108 Product Header

  • Bytes 0-1: Signature field that identifies this header as a product header.

  • Bytes 2-3: Header version.

  • Bytes 4-7: Image 1 location (offset in bytes from start address of memory)

  • Bytes 8-11: Image 2 location (offset in bytes from start address of memory)