On Saturday 15 September 2012 06:36:52 Ed Sutter wrote:
> Thanks Charles, this is all good news.
> My current plan is to see how well I can get this working in a non-Linux
> environment
> that is relatively small (in terms of flash size) 4Mbyte of NOR with 3
> of the 4Mg
> allocated to YAFFS2. Is that reasonable?
With "regular NOR" generally the best bet is to use the yaffs1 mode of
operation.
Let's assume you are working with 64k-byte blocks. We need to simulate
something like 512-byte NAND pages (ie. 512 bytes of data + 16 bytes
of "spare"). That gives us 124 of these pseudo pages per block.
Since NOR erasing takes a long time and the writes are word-by-word, you need
some extra flags to make the writes and erases appear atomic. For an example
on how to do this, look at the NOR interfacing code.
NOR does not suffer bad blocks, so the number of reserved blocks can be
reduced from typical 5 to, say, 2. That will give you far better usage of
those small memory regions.
Regards
Charles
>
> > On Thursday 13 September 2012 05:10:13 Ed Sutter wrote:
> >> Hi,
> >> Our use of YAFFS2 will initially be on a NOR-based system, not running
> >> Linux.
> >> I've read (on this list and on the yaffs site) that YAFFS2 works with
> >> NOR flash as well as NAND. Since NOR is quite different than NAND, I'd
> >> be interested to know how common YAFFS-on-NOR is and what the pitfalls
> >> are (if any).
> >
> > An extremely robust solution is indeed very possible and has been used by
> > quite a few organisations to ship high and low volume products.
> >
> >> For example, I did read somewhere that it is substantially slower to
> >> write files,
> >> so it would be nice to know how much slower.
> >
> > NOR is far slower to write and erase than NAND. That creates a bottleneck
> > to write speed.
> >
> > Write speed will depend very much on how much grabage collection (and
> > thus erasure) is being performed. Yaffs only adds a small overhead to
> > this.
> >
> > No hard numbers are possible because everything is so hardware dependent.
> > You can get a ballpark number by timing some raw NOR writes and adding,
> > say, a 10% overhead.
> >
> >> Also, are things like
> >> wear-leveling,
> >> garbage-collection and power-hit safety tested in a NOR based
> >> environment?
> >
> > Most certainly.
> >
> > Wear levelling is achieved by the way yaffs allocates blocks to achieve a
> > log structure.
> >
> > Power fail handling is part of the test suites that run on average for a
> > few hours every week. Power failures are simulated at a bit level on NOR.
> >
> > -- CHarles
>
> _______________________________________________
> yaffs mailing list
> yaffs@lists.aleph1.co.uk
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs