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:
Figure 96 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:
Figure 97 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:
Figure 98 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 the image.
Bytes 12-27: Image version information (ASCII string).
Bytes 28-31: Image timestamp.
Byte 32: Flags indicating encryption and signing status:
0x00: Not signed or encrypted
0x01: Encrypted
0x02: Signed
0x03: Signed and encrypted
Byte 33: Encryption pad Information on padding applied during encryption.
Bytes 34-39: Key information (6 bytes total):
ECC Key Information (filled with mkimage set_verification_info command):
ECC key index (1 byte): Index in OTP storage for verifying this image.
ECC revocation valid flag (1 byte): Marks if the ECC revocation index is valid.
ECC revocation index (1 byte): Index of the ECC key entry to be revoked in OTP storage.
AES Key Information (filled with mkimage set_decryption_info command):
AES key index (1 byte): Index in OTP storage for decrypting this image.
AES revocation valid flag (1 byte): Marks if the AES revocation index is valid.
AES revocation index (1 byte): Index of the AES key entry to be revoked in OTP storage.
Bytes 40-63: Reserved for future use.
25.1.3. Product Header
- The product header contains the following fields:
Figure 99 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)