Datasheet

58
SAM9G15 [DATASHEET]
11052D–ATARM–31-Oct-12
NAND Flash Specific Header Detection
This is the first method used to determine NAND Flash parameters. After Initialization and Reset command, the Boot
Program reads the first page without ECC check, to determine if the NAND parameter header is present. The header is
made of 52 times the same 32-bit word (for redundancy reasons) which must contain NAND and PMECC parameters
used to correctly perform the read of the rest of the data in the NAND. This 32-bit word is described below:
usePmecc: Use PMECC
0 = Do not use PMECC to detect and correct the data.
1 = Use PMECC to detect and correct the data.
nbSectorPerPage: Number of sectors per page
spareSize: Size of the spare zone in bytes
eccBitReq: Number of ECC bits required
sectorSize: Size of the ECC sector
0 = for 512 bytes.
1 = for 1024 bytes per sector.
Other value for future use.
eccOffset: Offset of the first ECC byte in the spare zone
A value below 2 is not allowed and will be considered as 2.
key: value 0xC must be written here to validate the content of the whole word.
If the header is valid, the Boot Program will continue with the detection of valid code.
ONFI 2.2 Parameters
In case no valid header has been found, the Boot Program will check if the NAND Flash is ONFI compliant, sending a
Read Id command (0x90) with 0x20 as parameter for the address. If the NAND Flash is ONFI compliant, the Boot
Program retrieves the following parameters with the help of the Get Parameter Page command:
z Number of bytes per page (byte 80)
z Number of bytes in spare zone (byte 84)
z Number of ECC bit correction required (byte 112)
z ECC sector size: by default set to 512 bytes, or 1024 bytes if the ECC bit capability above is 0xFF
By default, ONFI NAND Flash detection will turn ON the usePmecc parameter, and ECC correction algorithm is
automatically activated.
Once the Boot Program retrieves the parameter, using one of the two methods described above, it will read the first page
again, with or without ECC, depending on the usePmecc parameter. Then it looks for a valid code programmed just after
the header offset 0xD0. If the code is valid, the program is copied at the beginning of the internal SRAM.
Note: Booting on 16-bit NAND Flash is not possible, only 8-bit NAND Flash memories are supported.
31 30 29 28 27 26 25 24
key
-
eccOffset
23 22 21 20 19 18 17 16
eccOffset sectorSize
15 14 13 12 11 10 9 8
eccBitReq spareSize
76543210
spareSize nbSectorPerPage usePmecc