13.3.2.1 Firmware Image Format

The firmware image comes with a metadata header, metadata payload and metadata footer that gives the ROM firmware information about location of the firmware image, authentication information, sequence number and more. The user can only execute the application (firmware image) from embedded Flash.

The following table provides details about the contents of each firmware image.

Table 13-1. Metadata Storage Structure for 272-Bit Width Flash
OffsetByte 0Byte 1Byte 2Byte 3
0x000x00
0x040x00
0x080x00
0x0C0x00
0x100x00
0x140x00
0x18“MCHP”
0x1C0x00
0x200xFFFF_FFFF/0x00(1)
0x240xFFFF_FFFF/0x00(1)
0x280xFFFF_FFFF/0x00(1)
0x2C0xFFFF_FFFF/0x00(1)
0x300xFFFF_FFFF/0x00(1)
0x340xFFFF_FFFF/0x00(1)
0x380xFFFF_FFFF/0x00(1)
0x3CSEQ_NUM
0x40MD_REV (0x03)CONT_IDXMD_AUTH_MTHDMD_AUTH_KEY
0x44PL_DEC_MTHDPL_DEC_KEYPL_LEN
...PAYLOAD...
......
...MD_SIG
“MCHP”The indicator that specifies this is a Microchip metadata
MD_REVReversion of the metadata definition. This field is 0x03 indicating this is V3
CONT_IDXContain Indicator
  • 0: Boot Config, Device Cal, or RF Cfg/Cal.

  • 1: Firmware Image.

  • 2: Encapsulated Firmware Image

  • 3: Variable

  • 4: Stack Data

  • 5: App Data. Reserved. Application Storage Format should be defined by application developer

  • 6 - 255: Reserved

MD_AUTH_MTHDMetadata Authentication or Integrity Method:
  • 0: None.

  • 1: CRC16.

  • 2: ECDSA p256 + SHA2-256

  • 3: ECDSA p384 + SHA2-384

  • 4: Reserved

MD_AUTH_KEY

Metadata Authentication Key Index:

  • 0: Key #0
  • 1: Key #1
PL_DEC_MTHD

Payload Decrypt Method:

  • 0: Plain
  • 1: AES
Note: The current implementation always sets PL_DEC_MTHD to 0.
PL_DEC_KEYPayload Decrypt Key Index:
  • 0: Key #0
  • 1: Key #1
  • ...
PL_LENThe Length of PAYLOAD:
  • 0: 0 byte
  • 1: 1 byte
  • ...
PAYLOADPayload Data
MD_SIG

The signature of metadata authentication.

The signature length is authentication method dependent.

Note:
  1. To support ECC, these bytes are 0xFFFF_FFFF before SEQ_NUM is programmed; and they will be programmed to 0x00 when programming SEQ_NUM.
Table 13-2. Firmware Images Offsets for 2 MB Flash Variant
Embedded Flash Variant
AddressSize (bytes)
Image 0 metadata0x0080_0000512
Image 00x0080_0200Max: 60928
Image 1 Metadata0x0080_8000512
Image 1 0x0080_8200Max: 28160
Image 2 Metadata0x0100_0000512
Image 20x0100_0200Max: 2096640
Image 3 Metadata0x0110_0000512
Image 30x0110_0200Max: 1048064
Image 4 MetadataNANA
Image 4NANA
Image 5 MetadataNANA
Image 5NANA
Table 13-3. Firmware Images Offsets for 1 MB Flash Variant
Embedded Flash Variant
AddressSize (bytes)
Image 0 metadata0x0080_0000512
Image 00x0080_0200Max: 60928
Image 1 Metadata0x0080_8000512
Image 1 0x0080_8200Max: 28160
Image 2 Metadata0x0100_0000512
Image 20x0100_0200Max: 1048064
Image 3 Metadata0x0108_0000512
Image 30x0108_0200Max: 523776
Image 4 MetadataNANA
Image 4NANA
Image 5 MetadataNANA
Image 5NANA

For an embedded Flash-only device, the ROM firmware checks for a valid image in three memory locations, see Table 13-3.