To avoid Read Disturb the controller therefore logs the number of accesses to a block in order to copy it in one piece to a new location when a threshold is exceeded, and to delete the original block. The probability of this happening increases sharply after a few 100,000 reads. Even when only reading from the card, it can – just by reading – cause neighboring memory cells in the same block to change their programming. Read DisturbĪ phenomenon not yet mentioned by me, but particularly perfidious, is Read Disturb. Multilevel cell memory cells (MLCs) reduce the number of erase cycles and thus long-term reliability. The controller therefore tries to write / erase blocks as evenly distributed as possible by wear-leveling. In the course of operation, further defective blocks (bad blocks) are added. Defective blocks from the factoryįlash memories are already shipped with defective blocks. Erasing stresses the memory cells, and shortens their lifetime – new bad blocks are created. Dirty little secrets: Flash memory problems Deletion is only blockwiseĭata can only be erased block by block. The microSD card typically has – depending on the manufacturer – about 10% spare capacity to exchange the bad blocks with good “reserve blocks”. The controller adds blocks with clustered read errors to the list of bad blocks, and shifts the actual physical allocation of the logical block. These defective blocks are marked in a special area of the flash memory.Įrror correction information for individual blocks is also managed so that read errors can be corrected by checksums. This variation of the physical allocation is also the reason that write-testing the SD card (by writing & reading with bad block tools, etc.) will actually not identify the real bad blocks & allow you to avoid them on the operating system / file system level! Only the flash memory controller inside the microSD card knows which block is written to / read from at any given moment, and as discussed this can change over time.ĭefective blocks (bad blocks) are already present in brand-new flash memory. To avoid damage to individual areas that are used particularly frequently, the controller varies the physical allocation to the blocks that can be addressed logically by the file system (= wear leveling). The performance and longevity of the microSD card depends decisively on the algorithms used in the controller.įlash memory cannot be rewritten as often as required due to damage to the insulating oxide layer of the floating gates as described above. The task of the controller is to manage the flash, and in particular to perform wear leveling and read error correction. This is the reason that industrial SD cards usually have lower memory densities, and use SLC (single level cells), for better data integrity. With single-level cells, 100,000 to 1,000,000 write-erase cycles are possible, with TLCs (triple-level cells with three bits per memory cell) approx. On the one hand, this makes it possible to increase the density of the memory cells significantly, but on the other hand, readout is slower and the memory cells react much more sensitively with bit errors to charge losses. The transistor then conducts the applied current differently, which is evaluated during readout. Now, thanks to several floating gates per transistor, multi-level cell memory cells store different charge states and thus several bits per memory transistor. Initially, there were only two charge states ( 1 bit of information) per memory cell. As soon as this layer becomes conductive, no more information can be held in the memory cell. The reason for the limited lifetime is damage to the insulating oxide layer, which protects the floating gate from charge leakage, caused by the high voltages. Information that has not been changed must still be programmed in again.įlash memories have a limited lifetime due to programming and erasing, which is given in erase cycles Erasing (for a logical “0”) can only be done blockwise. Writing (for a logical “1”) can be done bitwise or at least byte / wordwise. A page has between 5 bytes, a block can contain up to 256 pages (thus a total of 2048 kB with 8kB page size). NAND flash components used in microSD cards group the individual memory transistors into pages, and several of the pages into blocks. For this purpose, additionally the control gate (V1/V2/V3) is used.įor erasing, the electrons are driven out of the floating gate again by applying a high negative voltage via the control gate. 10 V) are used than for the normal read operation (e.g. The transistor then blocks at a normal read voltage (does not conduct).įor programming the floating gate, significantly higher electrical voltages (e.g. the threshold voltage of the transistor, starting from which current would flow. Electrons introduced into the floating gate increase e.g. The information is always read between source (S) and drain (D).