2.2 Parallel NAND Flash Boot
The ROM code only supports 8-bit NAND Flash memories connected to the SMC; booting on 16-bit NAND Flash is not possible.
The correct PMECC parameters are indicated to the ROM code by writing a specific header at the beginning of the first page of the NAND Flash, just before the bootstrap. This header is built from a 32-bit word repeated 52 times. The ROM code selects the 32-bit word value with the most occurrences among the 52 values. This 32-bit word encodes precisely the memory geometry and PMECC initialization settings. Refer to the SAM9X7 data sheet, section “NAND Flash Boot: NAND Flash Detection” to get the exact layout of this 32-bit word.