1.7.2 Dual Boot Sequence Number

The sequence number is stored in the legacy location in the last row of user Flash in the active panel and in the inactive panel.

When configured for a Dual Boot mode, after a reset, the NVM Controller reads the boot sequence numbers contained in the BTSEQn words which are the last 128-bit flash words of each user program partition. It compares the sequence numbers and maps the partition with the lowest sequence number into the active space. The other partition is mapped into the inactive space. The current mapping is indicated by the NVMCON.P2ACTIV bit. The boot sequence number is a 12-bit unsigned value. The BTSEQn word format consists of a two 12-bit values with BTSEQn[11:0] containing the true sequence number and BTSEQn[23:12] containing its complement as shown in Figure 1-1.

Figure 1-1. Boot Sequence Number Word

BTSEQn[127:24] is reserved. A boot sequence number word is considered to be invalid if either:

  • BTSEQn[11:0] != ~BTSEQn[23:12]

    – OR –

  • The boot sequence number word read results an ECC DED error.

If a BTSEQn word is not valid, the boot sequence number for that partition is assigned the value 0xFFF. This is the highest possible boot sequence number. An unprogrammed word will yield an invalid boot sequence number. After determining the boot sequence numbers for each partition, the NVM Controller compares the boot sequence numbers and maps the partition with the lowest boot sequence number into the active space and maps the other partition into the inactive space. If the boot sequence numbers are equal, Partition 1 is mapped into the active space. When re-flashing or updating firmware in a device configured for a Dual Boot mode, the programmer or mission mode firmware programs the inactive partition boot sequence number with a value lower than the active partition boot sequence number. Upon a subsequent reset, the device will execute the new firmware.