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.

Nand write in u-boot

Guru 20755 points
Other Parts Discussed in Thread: OMAP-L138

Hello,

I am using Micron Nand MT29F1G08ABC , on u-boot OMAP-L138, and I write in the following sequence:

1. erase block

2, read complete page, change the first byte and then write back the complete page (2048 bytes)

3, read complete page, change the next byte and then write back the complete page (2048 bytes)

4. back to step 3. until I write the complete page

I see that after about 1280 bytes, byte 0x570 is 0xbf instead of 0xff.

Is there a problem in the way I use the Nand ?

Is it that I write too many times into page after only one erase ?

I thank you for any idea or guidance,

Ran

  • Ran:

    Any time you write new data the corresponding erase block must be erased first, setting all page data

    and spare area dat to 0xFF.  The nand write process can only change bits from 1 to 0.

    Also, it is very common to see "raw errors", ECC logic can correct a certain number

    of bit flips depending on the ECC format used.

    regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • Hi Michael,

    Thanks for your reply.

    The sequence I described before assures that only in the "next byte" from the whole of page is the byte where some bits will be changed from 1->0. for example lets assume I always write zeros one byte after the other:

    page after erase: 0xff 0xff 0xff 0xff .....

    write byte #1 with 0 (first copy the whole page to temporary memory and then write the page with first byte 0) therefore I attempt to write this sequence: 0 0xff 0xff ..... 

    page after #1 write : 0 0xff 0xff 0xff .....

    write byte #2 with 0 (first copy the whole page to temporary memory and then write the page with second byte 0) therefore I attempt to write this : 0  0   0xff 0xff..... 

    page after #2 write : 0 0 0xff 0xff .....

    Is there a problem with such sequence of writing ?

    Can it be that the problem is that I write "too many" times the page ?

    Regards,

    Ran

  • Ran:

    Micron NAND datasheet has this text under Program Operations:

    "Within a block, pages must be programmed sequentially from the least significant page

    address to the most significant page address (0, 1, 2, ….., 63)"

    regards,

    Michael T

  • Hi MIchael,

    Thank you very much for the information, I also find it in Micron datasheet,

    But do you understand from this passage that when we choose the first page of a block, we cannot re-write the same page again in the next write sequence (we must move to the next page for a successful write) ?

    If the answer is Yes, It means that although I did not write many bytes in the page (they are still 0xffffff ....) I cannot attempt to write them again, because the result is unexpected. It is far from how we thought we can use the Nand flash in the system.....

    Regards,

    Ran

  • One more thing the datasheet say is thatwriting a page is also possible with the RANDOM DATA INPUT (not sure it is supported by U-boot ?)

    "After the initial data set is input, additional data can be written to a new column address
    with the RANDOM DATA INPUT (85h) command. The RANDOM DATA INPUT com-
    mand can be used any number of times in the same page prior to issuing the PAGE
    WRITE (10h) command. See Figure 24 for the proper command sequence."

  • Ran:

    This is becoming  more of a question for Micron than TI.  I am also interested on what is meant by

    the statement about writing pages sequentially.

    Regards,

    Michael T

     

  • Hi Michael,

    I did try yesterday to find Micron support forum or email but found none, there web site just does not give any clue how to send question through email or even through any forum !!!
    Anyway, your replies were very helpful to me and I think that it  [ might ] point to not-correct use of the Nand. I just hope I will be able to verify it first with Micron before I am sure that this is the correct answer.

    Thank you very much!!

    Ran