6.4.2.2.1 Configuring Active/Inactive Partitions

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 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 value that is used for automatically determining the active partition upon device Reset. Each partition should have a unique Boot Sequence Number. For 33A devices, BTSEQ is located at the last address of the active and inactive address space.

The Boot Sequence Number is stored in two parts: the actual value in the bit field, BTSEQn [11:0] and the one’s complement of the value in the IBTSEQn bits field [23:12]. When the Boot Sequence Number is read upon a device Reset, the values of BTSEQn and IBTSEQn are automatically compared. 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 in an ECC DED error.

BTSEQ [127:24] is reserved and must read as all 0’s.

The complement value is not automatically created by hardware nor is it verified by hardware upon programming. The application must calculate and program the appropriate value

Figure 6-3. Boot Sequence Number

If dual boot is enabled, after a Reset, the device will read two unsigned sequence numbers (BTSEQn) from the user space of each dual boot region, validate and compare them, and memory map the regions accordingly.

If a BTSEQn word is not valid, the Boot Sequence Number for that partition is assigned the value 0xFFF for evaluation. This is the highest possible Boot Sequence Number.

Note: 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 (0x80_0000) and maps the other partition into the inactive space (0xC0_0000). If the Boot Sequence Numbers are equal, partition 1 is mapped into the active space.

The partitions can be prepared to be swapped during run time by reprogramming the Boot Sequence Number of the inactive partition to have a lower value. When a Reset is executed, the partition that has the lower value now becomes active. This method is used when the inactive partition has been updated and is then mapped to the active partition after a Reset.

The Boot Sequence Number is written with ECC parity bits. A Boot Sequence Number is invalid if the Boot Sequence Number read results in an ECC DED error.