From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Ellis Date: Wed, 23 Jul 2003 14:38:05 -0400 Subject: [U-Boot-Users] ECC code used in cmd_nand.c In-Reply-To: Message-ID: <00512BA4F9D3D311912A009027E9B8F407E522@NT> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Richard Woodruff wrote: > Can anyone verify that the write using "nand write aaaa offf > ssss" should work with ECC enabled? I'm finding that if I > disable the ECC generation I can write uImages and compare > them and get what I expect and boot from them. It has been working fine for me using the SXNI855T configuration. I built this morning's CVS version and it also seems OK. > If I enable ECC generation, on read it complains that they > are all wrong (but there is no errors on the write which I > think it should give if the written ecc does not match the > calculated one). If I disregard the ecc warnings and then > "cmp" the data starting which was loaded, the first 16k are > indeed the same (16k is my block size), however, there is > some differences at the end of the first block. Again, if I > disable ECC no such problem. If you write if with ECC, but read it back without ECC is the data still corrupted? The data may be OK until the bad ECC data is used to 'correct' it. > ...If I do a read.oob of the first block, it appears that the > data_buf[0] is written to the first position of the oob, > instead of the expected data. Are you sure NanD_WaitReady() is working? If it isn't, you could start to read the oob data before it is ready, and would see some old data from the start of the buffer. Dave Dave Ellis ~~~~~~~~~~~~~~~~~~~~~~~~~~ SIXNET - "Leading the Industrial Ethernet Revolution" 331 Ushers Road, P.O. Box 767, Clifton Park, NY 12065 USA Tel +1 (518) 877-5173 Fax +1 (518) 877-8346 Email me at: dge at sixnetio.com Detailed product info: www.sixnetio.com ~~~~~~~~~~~~~~~~~~~~~~~~~~