| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 130 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 130 Page - STMicroelectronics |
|
130 / 245 page ![]() Non-volatile memory device drivers UM0851 130/245 Doc ID 16604 Rev 2 The Flash contains four kinds of blocks (16 KBytes): ● Factory-default bad blocks. Usually NAND vendors mark the 5th OOB byte as non 0xFF in the first and/or second page in blocks that are bad for the 512 page size NAND Flash. ● Worn-out bad blocks ● Good blocks ● The first block: this block is guaranteed not to require error correction up to 1000 writes. This is needed because the initial boot code cannot do ECC. NAND Flash also guarantees that a minimum of 98% of the blocks are good. Since the usual bad block marker in the OOB area does not allow us to distinguish between factory-bad and worn-out-bad blocks, we need to store this information elsewhere. This place is called bad-block table (BBT) and is stored as a bitmap in the last two good blocks at the end of NAND. To increase security, a backup of those two blocks is kept in the two preceding good blocks as well. The BBT location itself is identified by special markers (BBT0/BBT1) in the OOB area of the first page of the respective erase blocks. The BBT consists of two bits per block Both U-Boot and Linux implement the same BBT layout and thus interoperate quite well. The BBT is created once a BBT-implementing U-Boot is started for the first time. The BBT scanning code assumes that the NAND is completely erased, and only contains 0xFF as content. Any block that contains bytes != 0xFF in the OOB is marked as "factory bad" block. In order to maintain the BBT created by U-Boot, the kernel needs to have BBT support enabled. In Linux, nand_scan() calls the function nand_default_bbt(). nand_default_bbt() selects appropriate default bad block table descriptors depending on the chip information which was retrieved by nand_scan(). The standard policy is scanning the device for bad blocks and build a RAM based bad block table which allows faster access than always checking the bad block information on the Flash chip itself. To skip this process NAND_SKIP_BBTSCAN can be used. Flash based tables It may be desired or necessary to keep a bad block table in Flash. This is mandatory for those chips which have no factory marked bad blocks rather have factory marked good blocks. The marker pattern is erased when the block is erased to be reused. So in case of power loss before writing the pattern back to the chip this block would be lost and added to the bad blocks. Therefore we scan the chips when we detect them the first time for good blocks and store this information in a bad block table before erasing any of the blocks. The blocks in which the tables are stored are protected against accidental access by marking them bad in the memory bad block table. The bad block table management functions are allowed to circumvent this protection The blocks in which the tables are stored are protected against accidental access by marking them bad in the memory bad block table. The bad block table management functions are allowed to circumvent this protection. The simplest way to activate the Flash based bad block table support is to set the option NAND_USE_FLASH_BBT in the option field of the NAND chip structure before calling |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |