Re: [Yaffs] How does YAFFS handle Memory deterioration?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
CC: Jimmie Hansson
Subject: Re: [Yaffs] How does YAFFS handle Memory deterioration?
Hello Jimmy

On Saturday 27 July 2013 00:55:59 Jimmie Hansson wrote:
> Hi
> Thanks for answering!
> Interesting with the year 2038 problem but i do not think i will have this
> problem because i will not use any os or possible some real simple os on a
> STM32F4 microcontroller. But it’s worth checking.
>
> Ok it sounds good that there are no FAT tables or any other file management
> data that will deteriorate. I was worried about that.
>
> Have been looking on how to port YAFFS to my STM32 microcontroller and I
> find it quite hard to figure out which file I should put the write and read
> drivers for my nand flash. Does anyone know any example code were YAFFS
> have been ported to a microcontroller without any os? (I am mostly working
> with hardware so I am kind of slow in coding)


It is quite easy to set up yaffs to work with no os, but read below first...
>
> Regarding how much ram that I need. I will have YAFFS on a 128 Mbyte flash
> memory and my picture files will be around 800 Kbyte each. Will it be
> enough for me to only rely on the internal 196 Kbytes SRAM in the STM32F4
> microcontroller for reading and writing these pictures?



No. You will need more RAM than that. The footprint is dependent, in part, on
the size of the storage and the number of files. It might just fit in, but
then you would not have any space for anything else.


> I have also been thinking of using nor flash and was thinking of simply
> storing raw data without any file system. But how prone to broken blocks
> are nor flash?

In general you do not have to worry about broken blocks in NOR. You will still
have to ensure that you have various markers etc so that you know that what
you have stored is valid to prevent getting screwed up by power loss etc.

> I will only rewrite the pictures around 30 times on the
> flash memory. Can I trust nor flash if I only write it 30 times or will I
> get problems with bad blocks? Is it necessary to have error correction code
> and bad block management when using nor flash?


In general, NOR flash is very robust and does not corrupt easily. I say "in
general" because I have worked with some NOR flash parts that were very prone
to corruption.


>
> //Jimmie
>
> -----Original Message-----
> From: Charles Manning
> Sent: Wednesday, July 24, 2013 11:44 PM
> To:
> Cc: Jimmie Hansson
> Subject: Re: [Yaffs] How does YAFFS handle Memory deterioration?
>
> On Monday 03 June 2013 06:07:59 Jimmie Hansson wrote:
> > Hi
> >
> > I am considering using YAFFS for storing pictures on a NAND flash in a
> > device that need to be able to function for 30 years. The pictures on the
> > NAND flash will get written to the flash when it gets manufactured and
> > then
> > the device will rewrite the pictures every year so that the pictures
> > don’t get corrupt from memory deterioration. The data retention on a
> > normal NAND
> > flash is about 10 years.
> >
> > Is YAFFS a file system that will be suitable for this kind of long life
> > application?
> >
> > How does YAFFS handle Memory deterioration?
> >
> > Will it be enough for me to rewrite a file every year for it to not get
> > corrupt of memory deterioration or are there any other crucial data in
> > the file system that will get corrupt over time?
>
> Hello Jimmie
>
> I think that would work pretty well.
>
> If you are going to make a product like that then I would be careful to
> test any implications of http://en.wikipedia.org/wiki/Year_2038_problem
>
> Yaffs does not really have other data to get corrupted. There is no FAT
> table
> or such. That actually makes it a very good candidate for the type of usage
> you are considering.
>
> There is a very small chance that old stuff in the log (ie. discarded data)
> could come alive again through "bit rot". It would make some sense to do
> some
> background garbage collection to clear this up. This is already wired into
> Linux but can easily be hooked up with other OSs.
>
>
> -- CHarles
>
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs