![](http://datasheet.mmic.net.cn/170000/MC80C52TXXX-16SC_datasheet_9174720/MC80C52TXXX-16SC_71.png)
71
SAMA5D3 Series [DATASHEET]
11121D–ATARM–03-Apr-14
ONFI 2.2 Parameters
In case no valid header is found, the Boot Program checks 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 to 1024 bytes if the ECC bit capability above is 0xFF
By default, the ONFI NAND Flash detection will turn ON the usePmecc parameter, and the ECC correction algorithm is
automatically activated.
Once the Boot Program retrieves the parameter, using one of the two methods described above, it reads 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.
12.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 a specific NAND header.
If the flag is not set, no ECC correction is performed during the NAND Flash page read.
When the NAND Flash has been detected using ONFI parameters.
The ROM memory embeds the Galois field tables. The user does not need to embed them in his own software.
The Galois field tables are mapped in the ROM just after the ROM code, as described in
Figure 12-9.
Figure 12-9. Galois Field Table Mapping
For a full description and an example of how to use the PMECC detection and correction feature, refer to the software
package dedicated to this device on Atmel’s web site.
ROM Code
0x0010_8000
0x0010_0000
Galois field
tables for
1024-byte
sectors
correction
Galois field
tables for
512-byte
sectors
correction
0x0011_0000
ROM Code
0x0010_8000
0x0010_0000
Galois field
tables for
1024-byte
sectors
correction
Galois field
tables for
512-byte
sectors
correction
0x0011_0000