NAND Flash driver and algorithms

Hi all,

I'm looking to use a low-density NAND flash part to store data. I don't need a file system on it as it will be used simply to store streams of binary data... nothing fancy. I understand that certain care must be taken when using NAND such as bad block management and write endurance issues.

My question is: is there non-proprietary code available (anywhere?!) that implements these features? Since NAND is becoming the dominant medium for mobile mass data storage, are there common approaches to these problems? Does every developer that uses NAND have to re-invent the wheel?

Any insight would be appreciated.

Thanks, Tim

Reply to
tmoloy
Loading thread data ...

I could not find any and had to write all my own code for a flash recorder I recently developed.

best of luck

Reply to
Elan Magavi

With the number of free FAT file systems out there, using a FS is very easy anymore.

Unless you are using a 1051 :-)

donald

Reply to
Donald

You missed the point donald, the OP was saying he did not need a file system at all. He needed code to do the (nontrivial) control of NAND flash memories.

Tim, the control of a NAND chip is also dependent on the hardware that is driving it, naturally.

Most NAND flash chips a similar, so the data sheets often tell you what you need to know. However, remember with NAND-flash you need to do ECC checking and crap like that, too, because they as much as say there WILL BE single bit errors.

By low-density you mean low-capacity, right? You might look at NOR-flash too, which I believe is easier to interface to.

Off the top off my head, you could look at Toshiba, Samsung, STMicro, Hynix for data sheets to help you out. The also have application notes and code usually. Just a matter of digging...

Rufus

Reply to
Rufus V. Smith

Thanks Rufus. I'll be using a Freescale processor from the i.MX family that has a native NAND flash controller. So that definitely simplifies things.

BUT, I'm leaning back towards NOR flash like you mentioned because I only need about 64 Mbits. I'd rather not have to deal with managing bad bits and blocks if I don't have to. I'd just have to get around the very slow erase times of NOR parts (0.7 sec per block erase).

So much for being adventurous!

-Tim

Reply to
tmoloy

For NAND flash drivers You can ask chip manufacturer - I know, that least ST gives some code for bad block managment and wear leveling.

Or maybe You can use SD/MMC card ? You can connect it using SPI interface.

Regards AK

Reply to
AK

What's so difficult with NAND Flash? Algorythms are well documented and there is not so many of them so it's a trivial task to write your own code. If one's too lazy he can borrow code from e.g. Linux kernel MTD layer.

Pardon my French, but what are you guys going to develop if you can not write such a trivial code? Are you using Visual Basic?

--
******************************************************************
*  KSI@home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************
Reply to
Sergey Kubushin

Funny how often this happens. Someone asks for advice or guidance on this board, a few considerate people try to help, and then some arrogant douchebag calls everyone lazy or stupid.

In other words, suck my balls Sergey.

-Tim

Sergey Kubush> > snipped-for-privacy@gmail.com wrote:

Reply to
tmoloy

You don't have to copy it verbatim. Just use it as an example of how to write your own code. Furthermore, all that code is based on NAND read/write/whatever algorythms so no matter who writes the code it will be almost the same. NAND algorythms are NOT GPL. And everything has its limits. Anyone can write a helloworld app and nobody will sue him. There is nothing magical in NAND driver; just follow the specs.

Implementing a filesystem atop of NAND driver is a different matter.

--
******************************************************************
*  KSI@home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************
Reply to
Sergey Kubushin

Borrowing code from the linux kernel is most certainly a violation of the GPL, unless the OP's product is also being release under the terms of the GPL.

ttyl,

--buddy

Reply to
Buddy Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.