0
\$\begingroup\$

I'm looking into NAND Flash memory to use with my AVR MCU (Atmel Tiny85). I am particularly looking at the 8Gb Spansion S34ML08G101TFI200.

I would like to sequentially read the entire contents of the chip, from the first address to the end.

My questions are:

1) Sequential read across entire chip?: Can I toggle RE# to sequentially read data across the whole chip's memory, or do I need to issue "read" commands periodically for new pages/blocks/planes.

2) Power-up read state?: in the data sheet under "Page Read", it says that on power up, the chip is in read mode, and no 00h command is necessary, but is the following 30h command required to start reading? Or can I just begin toggling RE# to start reading from the beginning of the chip memory? (In other words, can I jump into reading without any setup instructions?)

3) Speed requirements?: I've read that since these chips are so fast (25us read time), they are too fast for slower MCUs, but I feel this doesn't make sense since I can poll the chip and toggle RE# whenever I want. Does that sound correct?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

NAND flash is not, generally speaking, suitable for use with an ATtiny. Use a SPI serial flash chip with this microcontroller.

NAND flash chips are not usable in practice without a translation layer. A NAND flash chip will typically contain some number of bad blocks. This particular chip is guaranteed to be delivered with no more than 80 bad blocks per 4 Gbit, for instance. Keeping track of these bad blocks is the responsibility of the controller; however, with only 512 bytes of memory (!), this is going to be essentially impossible on an ATtiny85. (You don't even have enough memory to read a single page of the flash chip into memory!)

\$\endgroup\$
5
  • \$\begingroup\$ I had no idea about the bad blocks. In practice, what happens with the bad blocks? Does writing/reading them produce an error, or just give a garbage value? Is there extra latency with them? Does the MCU typically keep track of them by writing/reading to verify the byte was written correctly? My code is extremely lean, so I could keep track of the bad blocks on the EEPROM. But either way, thanks and I'll look into SPI serial flash chips. \$\endgroup\$
    – Tristan
    Sep 19, 2015 at 17:07
  • \$\begingroup\$ I'm also finding that 8Gb memory is only available as NAND Flash/EEPROM, which both can contain bad blocks. (SPI serial flash unfortunately seems to max out at 1Gb). Can blocks go bad over the time or do they just arrive bad from the factory? \$\endgroup\$
    – Tristan
    Sep 19, 2015 at 17:26
  • 1
    \$\begingroup\$ Blocks in a NAND flash chip will go bad over time as they are erased and rewritten. Another option worth considering may be an SD card in SPI mode. \$\endgroup\$
    – user39382
    Sep 19, 2015 at 17:26
  • 1
    \$\begingroup\$ @Tristan: Bad blocks are specified as having all zeroes written into a certain portion of them at time of purchase, and those portions are guaranteed to read all zeroes provided no attempt is made to erase the blocks. If a bad block is erased, it may appear to work normally, but spontaneously lose data at any time; if information about what blocks were marked bad gets erased, the chip should not be considered trustworthy (manufacturers test whether a block should be trusted to hold data for years under normal conditions by testing whether it can hold data for a few hours... \$\endgroup\$
    – supercat
    Feb 12, 2022 at 4:19
  • 1
    \$\begingroup\$ ...under extreme temperature conditions; blocks that fail to hold data reliably under such conditions are written with zeroes, but nothing else is done to permanently identify them). \$\endgroup\$
    – supercat
    Feb 12, 2022 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.