Questions about NAND (double)bit errors

Charles Manning manningc2 at
Wed Feb 15 22:17:04 EST 2006

On Wednesday 15 February 2006 03:10, Wolfgang Mües wrote:
> Hello Charles,
> Charles Manning wrote:
> > * YAFFS is very conservative on dealing with ECC failures. YAFFS retires
> > a block if one ECC failure is seen. JFFS2, IIRC allows five of so failure
> > before retiring a block. The Toshiba folk have told me that if a block is
> > going bad, it is most likely to start displaying recoverable 1-bit errors
> > before displaying non-recoverable multi-bit errors. Thus, YAFFS will
> > potentially perform differently in this area.
> About bad block detection: what is your oppinion about partitioning the
> flash (the programs in a read-only partition, the data in r/w).

This gets fs specific. With YAFFS (and I assume JFFS2, but consult an expert), 
grabage collection will force read-only files to get rewritten occasionally. 
Thus for ultimate reliability it is probably a GoodIdea to seperate the 
read-only stuff into a seperate partition. This is also a GoodIdea in that a 
smaller partition mounts faster (true for YAFFS and JFFS2). So if all your 
kernel + mount stuff is seperated from your rw stuff things will probably dgo 
> How about detection of ECC errors in read only partitions?

ECC should be done on both rw and read-only partitions. Sometimes NAND gets 
read disturbs which would impact on read-only partitions. Also, write 
disturbs from writes to one partition can still corrupt a read-only partition 
on the same chip.

> > One important factor, IMHO, is how you handle the write protect pin on
> > the NAND. Some people tie the WP to the power supply failure flag. IMHO
> > this is a bad thing to do since it can cause incomplete writes to happen
> > if the wp is asserted during a write or erase cycle.
> I have checked this.
> WP is tied to VCC, and VCC is stable at least 500ms after a power fail
> detect.

500ms is long enough to grow a beard.

There's been some interesting discussion over in yaffs-land on this. If you 
don't subscribe to yaffs list then you can catch up on the yaffs archive.

-- Charles

More information about the linux-mtd mailing list