62
11054A–ATARM–27-Jul-11
SAM9X25
62
11054A–ATARM–27-Jul-11
SAM9X25
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:
• Number of bytes per page (byte 80)
• Number of bytes in spare zone (byte 84)
• Number of ECC bit correction required (byte 112)
• 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 correc-
tion 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.
11.4.4.2
NAND Flash Boot: PMECC Error Detection and Correction
NAND Flash boot procedure uses PMECC to detect and correct errors during NAND Flash read
operations in two cases:
• when the usePmecc flag is set in the specific NAND header. If the flag is not set, no ECC
correction is performed during NAND Flash page read.
• when the NAND Flash has been detected using ONFI parameters.
The ROM code embeds the software used in the process of ECC detection/correction: the
Galois Field tables, and the function PMECC_CorrectionAlgo(). The user does not need to
embed it in other software.
This function can be called by user software when PMECC status returns errors after a read
page command.
Its address can be retrieved by reading the third vector of the ROM Code interrupt vector table,
at address 0x100008.
The API of this function is:
unsigned int PMECC_CorrectionAlgo(AT91PS_PMECC pPMECC,
AT91PS_PMERRLOC pPMERRLOC,
PMECC_paramDesc_struct *PMECC_desc,
unsigned int PMECC_status,
unsigned int pageBuffer)
pPMECC: pointer to the PMECC base address,
pPMERRLOC: pointer to the PMERRLOC base address,
PMECC_desc: pointer to the PMECC descriptor,
PMECC_status: the status returned by the read of PMECCISR register;
Summary of Contents for SAM9X25
Page 26: ...26 11054A ATARM 27 Jul 11 SAM9X25...
Page 138: ...138 11054A ATARM 27 Jul 11 SAM9X25 138 11054A ATARM 27 Jul 11 SAM9X25...
Page 162: ...162 11054A ATARM 27 Jul 11 SAM9X25 162 11054A ATARM 27 Jul 11 SAM9X25...
Page 216: ...216 11054A ATARM 27 Jul 11 SAM9X25 216 11054A ATARM 27 Jul 11 SAM9X25...
Page 266: ...266 11054A ATARM 27 Jul 11 SAM9X25 266 11054A ATARM 27 Jul 11 SAM9X25...
Page 330: ...330 11054A ATARM 27 Jul 11 SAM9X25 330 11054A ATARM 27 Jul 11 SAM9X25...
Page 374: ...374 11054A ATARM 27 Jul 11 SAM9X25...
Page 468: ...468 11054A ATARM 27 Jul 11 SAM9X25 468 11054A ATARM 27 Jul 11 SAM9X25...
Page 532: ...532 11054A ATARM 27 Jul 11 SAM9X25 532 11054A ATARM 27 Jul 11 SAM9X25...
Page 692: ...692 11054A ATARM 27 Jul 11 SAM9X25 692 11054A ATARM 27 Jul 11 SAM9X25...
Page 777: ...777 11054A ATARM 27 Jul 11 SAM9X25 777 11054A ATARM 27 Jul 11 SAM9X25...
Page 886: ...886 11054A ATARM 27 Jul 11 SAM9X25 886 11054A ATARM 27 Jul 11 SAM9X25...
Page 962: ...962 11054A ATARM 27 Jul 11 SAM9X25 962 11054A ATARM 27 Jul 11 SAM9X25...
Page 1036: ...1036 11054A ATARM 27 Jul 11 SAM9X25 1036 11054A ATARM 27 Jul 11 SAM9X25...
Page 1128: ...1128 11054A ATARM 27 Jul 11 SAM9X25 1128 11054A ATARM 27 Jul 11 SAM9X25...
Page 1130: ...1130 11054A ATARM 27 Jul 11 SAM9X25...
Page 1132: ...1132 11054A ATARM 27 Jul 11 SAM9X25...
Page 1144: ...xii 11054A ATARM 27 Jul 11 SAM9X25...