want to turn ’1111 1110′ into ’1010 0110′ we just flip the 2nd, 4th and and 5th bit of the block. Once a bit got flipped to ’0′ you can only get it back to ’1′ by erasing the entire block.Įven though you can indeed only address the flash “per erase block” for writing – and you have to erase (and therewith write the whole erase block) when intended to flip a bit from ’0′ to ’1′ – that doesn’t mean every write operation needs a prior block erase.īits can be flipped from ’1′ to ’0′ but only an entire block can be switched (erased) in order to get bits within back to ’1′.Ĭonsidering an (in this example unrealistic small) erase block contains ’1111 1110′ and you want to change it to, let’s say, ’1110 1111′, you have to:īut if we e.g. This is not totally wrong, but misleading since simplified.įlash storage cells by default have the state “erased” (which matches the logical bit ’1′). Usual conclusion of above is, flash storage can be read but not written byte wise – to write to flash, you need to erase the whole block before. Blocks can only be ‘erased’ for certain times, till they get corrupted and unusable (10.000 – 100.000 times are typical values). This is dedicated for meta information (like information about bad blocks, ECC data, erase counters, etc.) and not supposed to be used for your actual data payload.įlash storage needs to be addressed ‘by block’ for writing. NAND flash also may contain an ‘out of band (OOB) area’ which usually is a fraction of the block size. Whenever I write about (erase-)blocks on flash and your NAND flash has support for pages (most modern NAND flashes do), just consider mentioned blocks here as pages. Though technically erase blocks, pages and sub-pages are not the same, they represent – if existing – the smallest flash I/O unit. NAND flash consists of erase blocks which might consist of pages which might consist of sub-pages. When flash (especially NAND flash) got bigger and bigger in storage size, pages and later sub-pages got introduced. 64KB for a 4MB NOR flash, 64KB for a 256MB NAND flash, 128KB for a 512MB NAND flash. Usually NOR flash has much greater blocks than NAND flash – typical block sizes are e.g. ![]() ![]() Its size highly depend on the kind of flash (NOR/NAND) and the flash total size. ![]() Flash storage consists of so-called “erase blocks” (just called blocks from now on).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |