This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: NAND boot redundant backup

Part Number: AM3358

#1. What is mean of "Thmmce" in NAND boot feature list?

#2. ROM support 4 backup boot image, and described how to find valid image header as below.  if after finding a valid header, but encounter error bits more than 8/16 which can't be corrected, will it skip to next block or next sector to find next valid header? I assume it will, but did not find such description in TRM. below paragraph just telling how to find a valid header. 

Page data can contain errors due to memory alteration. The ROM Code uses an ECC correction algorithm
to detect and possibly correct those errors. The ECC algorithm used is BCH with capability for correcting
8b or 16b errors per sector. The BCH data is automatically calculated by the GPMC on reading each 512
bytes sector. The computed ECC is compared against ECC stored in the spare area for the corresponding
page. Depending on the page size, the amount of ECC data bytes stored in the corresponding spare area
is different. Figure 26-20 and Figure 26-21 show the mapping of ECC data inside the spare area for
respectively 2KB-page and 4KB- page devices. If both ECC data are equal then the Read Sector function
returns the read 512 bytes sector without error. Otherwise the ROM Code tries to correct error(s) in the
corresponding sector (this procedure is assisted by the ELM hardware) and returns the data if successful.
If errors are uncorrectable, the function returns with FAIL.

When the 512-byte sector successfully passes the ECC check, the ROM checks for a valid configuration
header. A configuration header is considered to be valid if the first value (the Start field) contains data
other than 0x00000000 or 0xFFFFFFFF. If the Start field is not valid, the ROM reads the next 512-byte
sector, performs the ECC algorithm as described above, and checks for a valid configuration header. This
process is repeated for the whole block until a valid header is found. If a valid header is not found in the
first block, the ROM attempts the same process in the next block. For NAND, the ROM checks for a valid
header in the first four blocks. If no valid header is found in the first 4 blocks, the NAND boot fails, and the
ROM moves on to the next valid boot source as dictated by the SYSBOOT configuration signals.

  • Hello Tony,

    I think that is a typo, where "Thmmce" should be read "the". I am reassigning to our ROM owner to comment on the other questions.

    Regards,

    Nick

  • Hi Tony,

    yes if an ECC error can't be corrected by the ROM, it will continue with the boot process in the next redundant block

    Regards,

    James

  • James,

    How does ROM code determine between ECC8 and ECC16. default is BCH8, for ONFI NAND device, under what condition will apply BCH16?

    From test result, customer found W29N02KVxxAF 2G-BIT 3.3V NAND FLASH need to apply BCH16 to write MLO, if apply BCH8 to write MLO can't boot.

    From TRM description, it is not detailed enough to get conclusion.

    ECC Correction
    The default ECC correction applied is BCH 8b/sector using the GPMC and ELM hardware.
    For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, CEh when manufacturer code (first ID byte) is
    98h the Cell type information is checked in the 4th byte of ID data. If it is equal to 10b then the ECC
    correction applied is BCH 16b/sector.

    Test several NAND device, get result as below:

    NAND parameter Spansion
    SLC NAND Flash 1 Gb, 2 Gb, 4 Gb
    GigaDevice
    GD9Fx2GxF2A 
    Skyhigh
    1Gb, 2 Gb, 4 Gb, 3 V, 4-bit ECC, SLC NAND Flash
    Winbond(1G)
    W29N01HZ/WxxNA 1G-BIT 1.8V NAND FLASH
    Winbond(2G)
    W29N02KVxxAF 2G-BIT 3.3V NAND FLASH
    Pagesize 2K 2K 2K 2K 2K
    OOB size 64 bytes 128bytes 128bytes 64bytes 128bytes
    ECC 1bit / 512 4bit/512bytes 4bit/528bytes 1bit/528bytes 4bit/544 byte
    Build-in ECC NO NO(9F) NO NO NO
    1th: Manufacturer Code 01h C8H 01h EFh EFh
    2th: Device Identifier DAh DAH DAh A1h/B1h DAh
    3th: Internal chip number  90h  90H 90h 00h -
    4th: Page/Block SIZE 95h 95H 95h 95h/D5h 95h
    Cell Type 01b 01b 01b 01b 01b
    ONFI NO YES YES YES YES
    command 90h /address 20h Not support 4FH 4EH 46H 49H 4Fh 4Eh  46h  49h 4Fh 4Eh  46h  49h 4Fh 4Eh 46h 49h
    ECh N/A 6    10H 00H 6    1Ch, 00h  6     10h, 00h/11h, 00h 6    18h,00h
    80   00H 08H 00H 00H 80   00h, 08h, 00h, 00h  80    00h, 08h, 00h, 00h 80   00h, 08h, 00h, 00h
    84   80H 00H 84   80h, 00h  84    40h, 00h 84   80h, 00h
    92   40H 00H 00H 00H 92   40h, 00h, 00h, 00h    92    40h, 00h, 00h, 00h 92   40h, 00h, 00h, 00h
    101  23H 101  23h     101   22h 101  23h
    ECC selected by AM335x ROM ? BCH8 BCH8 BCH8 BCH16
  • it says it in the description, if the cell type is 10b, then it will use BCH16, otherwise it will use BCH8

    Regards,

    James

  • For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, CEh when manufacturer code (first ID byte) is
    98h the Cell type information is checked in the 4th byte of ID data. If it is equal to 10b then the ECC
    correction applied is BCH 16b/sector.

    The description is little hard to understand for me.

    #1. The first condition is device ID codes which are one of those: D3h, C3h, D5h, C5h, D7h, C7h, DEh, CEh 

    #2. Then check manufacture code: if it is 98h.

    #3. Then check 4th byte of ID data: it is 10b apply BCH16.

    But the device Winbond(2G) W29N02KVxxAF device ID is DAh, manufacture ID is EFh, Cell type is 01b, why it need BCH16? from the procedure, it even doesn't match #1 condition.

  • I don't think the ID codes given are meant to be an exhaustive list.  I believe those are listed because they could be 2K or 4K page devices, and there is some further checks to determine the ECC

    I believe the ROM will attempt to use the ONFI parameters when possible.  So it is probably using the ONFI parameters from the Winbond device, even though it doesn't match any of the device ID codes given.

    Regards,

    James