PDA

View Full Version : Program NAND Flash memory


marvelous
02-22-2006, 10:50 AM
Hello there,

I want to program a NAND Flash Memory hoping to make an amateurish Flash Disk. I have Low Level I/O Drivers (LLD) for Read, Program and Delete (Erase). I have ECC and Bad Block (Sector) Management. I need Wear Leveling.

Okay..I first want to share with you what I know about those concepts.

1) To start with LLD, I know it is required to read or program a page and to delete a block.

2) ECC is required to manage errorneous pages and this ECC just blocks those pages so that next time no data is lost or corrupted.

3) Bad Block Management is run after writing to a block and it cancels the block if the write was errorneous.

4) Wear leveling is to reduce uneven leveling of blocks.

As for wear leveling, I am planning to count the number of "erase" of each block and then I can write new data (input) to blocks which are less erased or less used. How does that sound to you? Does it sound like a good methodology to prevent wearing?

Okay..do you think I need to have other codes for my flash disk? (other than LLD, ECC, Bad Block Management and Wear Leveling).

By the way, I come up with Flash File System (FFS) when I do a search on the net. What is it really? Do I need to implement an FFS to my device? I am just going to use a simple controller MCU which is to communicate with NAND Flash from parallel port. It will also communicate with the USB host. I will use MSD specifications and I think it leads me to FAT. Can you make a comparison between FFS and FAT if they are comparable?

Do I need to implement some other specific codes to my device so as to make it run in MacOS, Linux and Windows flawlessly?

How can I make my device bootable? (Is it something related to bootloader??).

Okay..see I have lots of question. I am sorry :) Just a beginner.

Any help or idea would be greatly appreciated.

All the best to you!

Marv.

PrntRhd
02-22-2006, 10:40 PM
Split this into a thread of your own.

Jier
05-03-2006, 11:14 PM
hi,

the FFS is also a file allocation system adopt by linux that function like a FAT from microsoft. the FFS used the journaling method to keep track of the erase/program cycle of every single block of the nand flash. form the information i get, the FFS is not suitable for nand flash due to thier architecture but linux had this call "YAFFS" specially for nand flash, but i cant understand much on it. FAT is main for hard drive and not for flash. the hard disk dun hv any life times on the erase/program cycle but the nand flash do. so, the constant update of the FAT table and the root directory sector may also cause the nand flash wear out faster.

i'm currently implementing the FAT structure on to the nand flash and i found some difficulties, hope anyone able to help me.

i had this nand flash -> 256MB: 1page = (2046 + 64), 64pages = 1 block, total block number = 2048.
izzit 1 sector = 1 page, and 1 cluster = 1 block? if this is the case, my cluster size is larger than 65535bytes which the microsoft claim this may cause problems. :confused:

besides, 1 logical address represent 1 block? so my total logical address is 2000? :confused:

all the information i get is 1 sector = 512+16 byte where the structure can be known but 64byte redundancy area,what is the stucture??? anyone able to help can direct email me oso ->ycherjier[AT]yahoo.com