Need help with flash memory control.

Oct 10, 2005 10 Replies

I am a hardware engineer designing an embedded application. I want to add up to 1GByte of non-volatile memory. The first product offering will require 256MByte but I need room to expand. The whole assembly must be extremely small in size.



It appears my only option for a large non-volatile memory space in this embedded application is NAND flash. However, the micro I must use does not have an external memory interface. It has a SPI buss. It also has quite a few general purpose I/o ports.



I can't find SPI based serial memories above 32Mbyte. This will not suffice.



A friend recommended we BIT-BANG the memory interface between micro and NAND flash using general purpose I/O ports. This sounds complex. I haven't hired an embedded programmer yet so do not know what is possible. I DO NOT want to design a hardware platform this person will not be able to work with.



Can anyone lend me some insite about what is involved in creating such an interface? I know enough about embedded coding to get me in trouble. That is about it. Just want to start along the right path.



Gerb.



Hi, And why don't you use a SD or MMC card (SPI) ?

--

--- Yvan

formatting link

Pour me répondre :

formatting link

"GerberMultit00l" a écrit dans le message de news: snipped-for-privacy@g49g2000cwa.googlegroups.com...

There is an introduction in here:

formatting link

tim

Gerb,

You could use an MMC card socket (or is it a connector?) and use MMC or SD cards. That may be the least expensive way to go and an SPI bus can be used to access them. I've done just that before.

Bit-banging a large FLASH chip would require a bunch of IO pins. You might need 8 for data, 2 for control and 28 or more for address. You could still use your small MCU and some serial-in/parallel-out shift registers, but that can be slow, difficult and expensive.

Noel

I realize SPI buss is the native interface for MMC cards and that SD cards are backwards compatible. This would be a solution. However, I ruled out using MMC or SD flash cards for the time being due to cost. I intend on manufacturing a couple million of these things and have a slim profit margin. It is my belief that adding a single NAND flash chip on board will be much cheaper than adding a card slot and Flash card. I may be wrong but it only makes sense that I am right.

The NAND flash interface requires 15 lines. I have over 50 general purpose I/O ports available. I don't think that will be a problem.

My key concern is with software overhead. In a ideal situation you would just write data to a register and supply a memory address. The memory controller module would take over from there. But, this device does not have an external memory controller (not that one would work with NAND flash anyway). Here, the memory controller needs to be created in software. I'm not to sure what is involved with that.

Now that you know this, any more ideas?

Gerrrb

If you need 256Mbyte now and 1Gbyte in the future then you will have to use Flash memory. This means that you'll have to implement the interface and state machines needed to control the flash. Writing to flash is a relatively slow operation as you can see from any datasheet. Also, the largest flash chips available now are 4Gbit, and they probably cost a fortune.

Have you thought about cracking open an iPOD and using the hard disk !

Ken

formatting link

Cracking open iPods is not an option for the volume of devices I wish to manufacture. Plus, it might get a little costly....

Gerrrb

I don't think so. The standard mode for MMC is a serial mode but not SPI, the cards have to be placed in SPI mode first. IIRC SPI support was even supposed to be optional.

You probably are right but if you really are planning on manufacturing in the millions I'd check the quantity breaks on each.

Robert

Sounds like some kind of logging application? Why so much storage space? How fast will data need to be written to the flash? How will you retrieve the data from the flash? Serial comms?

I think you should use an SD / MMC card for the following reasons:

  • The card implements all the logic needed to manage the flash memory, has wear levelling and provides and easy interface. This will make life easier for the embedded engineer.
  • You can change the memory capacity of the device by changing the card instead of soldering more flash chips. Your software can then easily know how much memory is available.
  • An SD card can be removed and placed in a card reader, allowing easy transfer of data to a pc.
  • 1GB cards could be had for pretty cheap in bulk.

Ross

If that's the case, it would help to know what those lines are. Then you'll need to take a good look at the IO architecture of your MCU. You may find that the overhead is not that much at all. What devices are you using?

Noel

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required