What is NAND Flash Function?
TL866/T56 Programmer NAND FLASH bad blocks deal with a lot of different companies or system providers will choose different bad block handling methods to meet the needs of product development. TL866IIprogrammer defines the commonly used three methods for the user to choose to use. And the combination of user-defined ECC algorithm for flexible applications.
NOR Flash Fully random access to memory-mapped and dedicated interface (such as EPROM) address and data lines. NAND flash memory address less line. It is through the 8/16-bit wide interface bus to send commands, addresses and data to the internal registers, so many master control provides a more flexible configuration, NAND flash structure, emphasizing lower cost per bit, higher performance , And like the disk can easily upgrade through the interface, NAND lower cost, larger capacity.
Nand Flash allows bad blocks to exist. Due to the NAND production process, the chip will randomly appearin the factory bad blocks. The bad blocks have been initialized at the factory and marked as unusable in the special area. If bad blocks appear during use, they also need to be marked.
Easy tobit reversal.NAND FLASH more easyto bit reversal, if bit reversal appears in the key files, will cause the system to hang up. Therefore, in the use of NAND FLASH at the same time, the need to use ECC / EDC and other algorithms to ensure reliability.
Spare zone exists.Because NAND FLASH has the above two special places, Spare area plays the role of deposit bad block mark, ECC value and chip information and file information.
NAND FLASH must be bad block processing
Select a chip, the software interface as shown
1.Click this button <Select IC>
2.Custom <BBT> Bad Block Table button
TL866II programmer, set an optional block size custom table, the table can generally be used as a dedicated bad block table BBT,when the contents in the file is burn finished, followed by the contents of this table can be written to and location that user set in the configuration interface. However, the block index number written by BBT parameter settings need to ensure that the address blocks do not overlap.
(1) The data in the BBTcan be changed in the DLL custom function according to the actual burning result of the chip.
(2) The BBT can be loaded with initial values: The file can be opened in the File menu and the data is pre-loaded into the BBT table.
(3) This table is ignored if the option Enable BBT Programming to Block is not selected in the programming configuration.
3Before reading the chip: you need to first set the file name of the archive
When programming a chip: Set the source data file name to be written to the chip.
Note: In NAND programming, the data is written directly to the chip from the set <Sourcefile>. Read the contents of the chip is saved directly to the file.
This operation is different from other chips, other non-NAND chip operations: programming, the buffer data (in memory) is written to the chip. Read the chip data is read into the computer buffer. When saving a file, the data in the cache is saved to a disk file. Open the file is thatthe disk file data transferred to the computer memory.
In NAND, <save file> and <open file> are operations on the BBT table’s memory buffer.
This document MT29F1G08ABAEA, for example, describes the TL866II programmer NAND FLASH burning method.
The MT29F1G08 consists of 1024 blocks, the TL866II programmer operates on a block basis with index numbers 0-1023.Each block has 64 pages (pages), each block is processed in the order of pages written to the chip.
Each page size: 2048 bytes (Page size) + 64 bytes (Spare size) = 2112 bytes
The total chip capacity is: 2112 * 64 (pages) * 1024 (Block Block) = 138,412,032 bytes.
As shown below, click <Config> button to enter the programming Configruation interface.
The exact configuration of the programming parameters is the key chip can be programming normally.
Spare Area In file
Include spare Area
Due to the special nature of NAND FLASH, the data in the user file contains the Spare Area data according to the actual situation.
If not include:
Spread Area (redundant area 64 bytes) data will not be saved in the saved file when reading the chip contents.
When programming (writing) a chip, the programmer only reads PageSize (1024) bytes of data from the file, and the next 64 bytes of data (SpareSIze) will default to blank data (0xFF). This situation, the general need to use user-defined algorithm files, the data in the redundant area according to user requirements correctly filled in.
Bad Block Handle Mode
There are three ways to deal with bad blocks:
Skip Bad Block:
In the process of reading and writing chips if found bad blocks, TL866II programmer will skip the bad block directly to the next blockof data to read or write. Write Flow as shown belowTable 1-1:
Hard Copy: Forces the data to be read or written regardless of whether or not the block has a bad block mark, andstops programming if an error occurs during programming. This method is usually technical maintenance, the use of memory chips replacement method.
BB to Block: Found bad blocks written to the beginning of a particular block, so the advantage is to make the system logically feel the memory is still a continuous area, usually used in conjunction with the partition (Partition). In the following example configuration details. Enter the number in the edit box (Example: 900) is the replacement block index (address) actually written to flash when a bad block is found
MarkBB When Verify Error：
When a parity error occurs after programming the data, this block is automatically marked as bad and the data is written to the next block (Skip Bad Block), or the data is written to aspecific block .(BB to Block alternative address)
If not, the programming will be terminated when the verification error occurs.
Permissible ERR bits
None:does not allow an error to occur
1bits / 256bytes: One bit error per 256 bytes. Bit flipping may occur when reading NAND FLASH chip and will not be considered as an error if a bit error (256 consecutive bytes) is detected during verification. However, spare area in the data is still not allowed to appear any bit error.
Divide the file contents into NAND FLASH. Or according to the requirements of the partition
read into the file.
The software allows the file content is set to 5 partitions,programmingrespectively.
ENOptions: Select whether to allow the partition.
Start of BLK: partition start block index number
End of BLK: partition end block index number
Counts of R / W: The number of blocks the programming software actually reads or programming to this partition.
Partition parameter setting requirements:
AAll the block index number, can not be greater than NAND FLASH actually contains the number of blocks.
BStart of BLK ≦End of Block, Counts of R / W ≦(End of Block s -Start of BLK + 1) The number of blocks actually written during partitioning (Counts of R / W) is preferably smaller than the block size of several blocks .Make it have some margin
CThe Start of BLK for the next partition should be larger than the End of Block for the previous partition.
If you use the BB To Block option,the Bad Block replacement address should not be included in any of these partitions. If you use a BBT table, the BBT tables should not be included in any of these partitions.
Enable BBT Programming to Block xx
The data in the BBT table is programmed to xx BLOCK
When this option is enabled, the programmer finally writes the contents of the BBT table to the specified xx block after all partitions (or all file data) have been written to FLASH.
Enable User Algorithm file
Enable user-defined algorithm file
In the custom algorithm file, the user can process any data in the block before the data processing or automatic serial number calculation, as well as ECC algorithm and so on. BBT table data can also be automatically filled according to the bad blocks in the programming process, so that the user can verify that the application reads the contents correctly.
Specific methods of operation, please refer to DLL dynamic function of the original code comments.
Configuration Example 1 (MT29F1G08)
1) Programming the flash with 2 partition table .
2) Bad block processing mode: Skip bad block.
3) File data: include spare area (generally the original data file needs to be handled Spare area)
4) Use 2 partitions1st partition: from 0 # -199 # A total of 200 BLOCK, the actual data length is10 BLOCK The second partition: from 1000 # -1023 # A total of 24 BLOCKs,the actual write data length is5 BLOCKs The written data file is: 222.BIN (Note: NAND programming can only use binary format files)
Through the above settings, the programming operation can be performed.
If the file is not long enough, then the programming is finished.
If the length of the file exceeds the length of the BLOCK (15 blocks) data to be written, programming is completed after the set number of BLOCKs have been written.
The operation results are shown in Table 1-2:
Note: In this configuration example, read or verify the chip,always by partition by partition .
1.Read 10 blocks blocks saved to the file from Part from Part from Partition 1.
2.Read 5 blocks blocks saved to the file from Partition 2.
With setting up partitions partitionsup flexibility, you can read or write a few single BLOCK of data individually.
Configuration Example 2 (K9F1208U0C)
To K9F1208U0C example chip capacity: (512 +16) * 32 * 4096 blocks
Page Size: 512 bytes
Spare size: 16 bytes
Pages Per Block : 32 pages
Block Size : 4096
1) Use (Partition) partition table NAND FLASH into the file write operation
2) Bad block processing mode: BB toBlock 4000, found a bad block, write block 4000 # start position
3) File data: not include spare area (Spare area in the DLL processing content)
4) Using 2 partitions,1STpartition: from 0 # -1000 # A total of 1001 BLOCK, the actual length of 100 BLOCK.2STpartition:from 2000 # -3999 # A total of 1000 BLOCK, the actual length of 3 BLOCK.
5) The written data file is: 222.BIN (Note: NAND programming can only use binary format files)
6) Enable BBT Programming to Block 0. The contents of the BBT table are assigned to 0# Block.
7) Enable User Algorithm file, enable the algorithm file, ECC_256Bx2-SMALL.dll, (the DLL instance only calculates the ECC value into the spare area, the user can modify the DLL function according to the actual need, modify the contents of the BBT table)
8) Proramming Flow shown in Table 1
Table 1-3: Programming Flow:
Note: 16 bytes Spare Area Data get from DLL function or all are 0xFF
5.7 Save the project file
All the configuration parameters and BBT table contents can be “saved project” after the setting is completed. When it is used again, it can be directly programmed after opening the project file and is suitable for mass production.