04.01.2023
Home / Miscellaneous / Programming NAND FLASH. TNM5000 universal programmer programmers usb for flash nand circuits

Programming NAND FLASH. TNM5000 universal programmer programmers usb for flash nand circuits


This is a universal device for programming a very wide range of microcircuits, ranging from banal I2c and MicroWire chips to multi-legged Nand Flash.
Over the years of amateur radio and electronics hobbies, I have accumulated a fairly large number of such home-made devices, assembled for specific tasks and just for the sake of the process itself. With the advent of an increasing range of microcircuits and an increase in their capacity, it was necessary to acquire a factory device, the well-known MiniPro TL-866.
The device is really very nice, has been serving faithfully for many years, but the lack of contact control, hardware limitations and, as a result, the inability to work with modern chips, made me look at more expensive and functional devices. A cursory review of the market for such devices led to the realization that two devices most clearly correspond to my needs: the Russian ChipProg-48 (1) and the Iranian TNM5000. The second one turned out to be more than 2 times cheaper with comparable functionality, and after some persuasion, my frog, who had lost her vigilance in the process of choosing a gift for her beloved for her birthday, could not reasonably object.
On the page of the official seller on Aliexpress, an order was made, Singapore Post delivery was selected and payment was made. In the process of further correspondence with the seller, by the way, very sociable, it turned out that he is most preferable to send by courier SPSR. This is faster, but additional passport data is required for customs, which caused some concern, because. The parcel was met not by a citizen of the Russian Federation. We agreed on the usual russian air, the seller compensated for the difference in delivery with a not very running SSOP34 adapter.
Despite all the concerns, the delivery was fast and hassle-free.
So, an Iranian programmer from China was deported to Russia and transferred to Belarus by a specially trained resident in Moscow, a citizen of the Republic of Belarus with temporary registration. Such a complex scheme helped to avoid paying duties on postal attachments worth more than 20 euros for goods crossing the customs border of the Republic of Belarus.


In the photo the programmer himself, USB cable for connecting to a computer, a vacuum suction cup for transferring small chips, an in-circuit programming cable, a bonus NAND Flash K9GAG08U0E-SCB0 chip, and an SSOP34 adapter, quite high quality. The CD with software and instructions was not included in the photo, I forgot it in the box.


The box was unexpectedly larger than I imagined, the contents matched the description.
For comparison, a photo with the popular TL-866.








By the way, the price tag for adapters from the seller is just horsey, I bought the TSOP48-DIP48 adapter I needed from another seller at times cheaper, just of excellent quality and the panel seems to be even Japanese YAMAICHI.




The case of the programmer is made of fairly high-quality dark-colored plastic, without burrs, flash and other attributes of a semi-basement assembly. On one side of the case, there is a 10-pin in-circuit programming connector, this is a standard IDC10. Above, a 48-pin ARIES DIP socket. It is curious that, unlike other sockets, it is brought to the open state with effort, and it is brought to the “chip inserted, clamped and ready to work” state by itself, this is its default state. On the top of the case there is also an activity indicator and a sticker with the model of the programmer.


On the other hand, there is a standard USB-B for connecting to a PC and a connector for additional food, of an unknown design, carefully covered with a warning sticker.


On the bottom of the case there is a sticker with information, a warranty sticker on the screw and rubber feet.


The programmer has a one-year warranty, which I’m unlikely to be able to use, but just in case I won’t do a dismemberment, we’ll use a photo of another, more daring owner.






Here is the description of the programmer in Russian, I will also plagiarize a little:

Additional Information

Flash Memory (Parallel/Nand/Serial), EPROM, EEPROM, Serial EEPROM, Microcontrollers, NVRAM, FRAM, CPLD, PLD, FPGA).
High quality 48pin ZIF board and 10pin ISP/JTAG connector.
USB 2.0 High Speed
Programming 1 Gb Nand Flash less than 50 sec
Analysis of NAND chips for the presence of BAD blocks, can skip them when writing, when reading.
Automatic detection of all flash-memory / microcontrollers with Device ID.
Convenient software for WIndows XP/VISTA/7/8 (32.64 bits).
The function of testing the contacts of the supplied microcircuit (Pin Test)!
If you inserted the IC badly into the block, or it has dirty pins, the programmer software will report this and indicate the number of this contact!
Low cost of the main unit and budget adapters.
One 32/40/48 TSOP adapter for all flash memory.
One TSOP56 adapter for all 56pin flash memories.
Special features that greatly expand the capabilities of the programmer, we get several programmers in one:
Full emulation of Altera USB-Blaster for Quartus-II Software.
Full Serial Port Emulation.
Vehicle ECU, Immoblizer & Dashboard microcontroller Support.
TopJTAG Flash Programmer, TopJTAG Probe.
The heart of the TNM 5000 programmer is a 500.0000 Gate FPGA with a designed CPU core with 96MHz Clock for fast IC programming.
Working with OTP area of ​​chips EN25F16, EN25F80, EN25Q16, EN25Q32, EN25Q64… Reading… saving… editing… programming OTP area of ​​chips.
Parallel flash up to 56pin:
It supports various types of packages (PLCC, TSOP1, TSOP2, VSOP &…). All flash can be automatically detected by the software. Using one adapter for all 32-48 pin TSOP flash, user only need 1 adapter for more than 2000 flash chips.
NAND Flash Memories:
The programmer has additional Nand+ software specially designed for NAND Flash. Nand+ software has one of the most complete list of NAND Flash Memories with bad data correction algorithm in MLC NAND. The TNM5000 is one of the fastest Nand programmers in the world with read and write speeds up to 8 megabytes per second. All Nand can be automatically detected by the software.
Serial flash memories:
All 8-16 Pins serial SPI flash are supported by the programmer. All flash SPIs can be detected automatically by software. It reads and programs SPI flash at a maximum safe speed of 6-7Mbps. Also removes protection, with write protection blinking before writing data.
Microcontrollers:
ATMEL: All AVR 8 bit chips (ATMEGA/ATTINY/AT90S) are supported on ZIF Scocket & ISP cable. Supported AVR programming up to 64 pin. The newly introduced ATXMEGA series and PDI and JTAG method are supported. Old C51 series & new single cycle C51 series are fully supported. All series can be detected automatically. ARM7 programming via JTAG is supported.
Microchip PIC:
One of the most full list devices for Microchip PIC microcontrollers including all PIC12F/PIC12C/PIC16C/PIC16F/PIC18F/DPIC33F/J&K Series. Devices up to 40 Pins can be programmed on the ZIF Scocket, all PICs can be detected automatically and are programmed by ISP cable.
Additionally:
Programs MIO KB9012, ST, SST, Philips (NXP), Motorola, Syncmos, Silicon Lab, ICSI, Infineon, Intel, Winbond &…
Automotive microcontrollers:
Support ST10F & TMS370 series ISP cable for many BOSCH / VALEO / SAGEM ECUs (full support for ST10F from XPROG-m programmer device list). Support Siemense & Infineon SAK - C167 connected to 44 or 48 pins flash (Siemense / BOSCH / SAGEM S2000 ECU), like HSE FlasHit Programmer. NEC & Support Motorola devices for Dashboards. Supports Motorola / FreeScale MC68HC11KA4 / MC68HC11A8. Supports MC68HC908 series OTP fuse added. Infineon Tricore family Audo-NG (Next Generation) TC1796 TC1766 with support of External 32-bit Flash (S29CD032 - S29CD016) in new Bosch ECUs. Motorola MPC562 MPC561 BDM programming for External Flash & External EEPROM in EDC ECUs (Bosch & Sim2K). Motorola HC9S12DG64 / HC9S12DG128 / HC9S12DG256 / HC9S12DG512 series with security bypass feature.
PLD/CPLD/FPGA:
Support for all ALTERA JTAG devices via Altera USB Blaster Programmer in Quartus Software emulation. Support Xilinx CPLD/FPGA with jed file. Quick configuration of Xilinx FPGA with bit file. Support for GAL/Palce devices with special option for Palce unlock.
Multi-language software (English/Chinese/Arabic/French/Farsi/Russian). Other languages ​​and devices can be added upon customer request. You can download the software and run it in demo mode to evaluate it.


Well, I can't wait to test the device in operation. We carefully put the chip into the adapter cradle, install the adapter itself into the universal socket of the programmer, connect the programmer to a laptop, a laptop running 32-bit Windows 10 with installed software downloaded in advance from the manufacturer's website.




For the programmer to work with NAND FLASH chips, one software is used, to work with the rest of the variety of chips - another.
We select our chip from the list, and ...


The device carefully warns about the non-contact of specific legs of the chip. Gently wring out the panel, move the chip - everything is ok. To check, we run autodetect - the programmer determines the nearest chip of this family, everything is OK.


We write, read, erase, everything is OK, the programmer quickly fulfills all modes.
Well, let's proceed to the main action, for which the programmer was bought. At work, we use many dozens of industrial WiFi hotspots HP MSM-310R.


The device is expensive, but nevertheless failing. The warranty has expired, and a certain number of them have accumulated. Inside, as Hewlett-Packard and other white brands like it, there is a bought-out manufacturer, Canadian Colubris.


Judging by the meager information from the manufacturer, and the blinking of the LEDs, it was possible to understand that the problem was software. The point was corny not loaded due to a failure in the internal file system or a worn out flash memory chip. Well, we blow off the K9F5608UOD chip with a hairdryer from a live point, read it, solder it back. We find out where in the read dump there are configuration parameters that describe the serial number and MAC addresses of the device. There are two of these, a couple of kilobyte blocks. They are identical to each other. From a dead point, we also blow off the chip, subtract it, find identification blocks in the dump at the same addresses, cut it out, save it. We replace these blocks in the firmware read from a live point with the required ones with serial numbers and dead MACs. We flash a new chip, previously purchased on Aliexpress, with this combo firmware, solder it, and voila, the point works. I was lucky, the new chip I purchased turned out to be of very high quality, and there were no bad blocks from the factory, so the dump could be written one-to-one, without any shifts. Of course, it would be more methodologically correct to connect to the jtag interface of the point's processor, but at that time it was too much to try the unknown.
And finally, I would like to tell you about the mini-competitions of some of my programmers. I took them out of the bins, photographed them and prepared them for testing.


Meet Bidipro, a self-soldering device that was quite popular among radio destroyers in its time. But due to a long inactivity, somewhere a hardware error crept in in the form of a non-permanent or short circuit, caused by a nostalgic electronics engineer's avaricious tear that fell. And besides, the control software requires DOS. Drops out at the start.


The second device, a clone of SEEPROG, is a good serial chip programmer, the manufacturer is still updating the software.


The third participant - Ezoflash, a simplified version of Willem, was also actively used before the acquisition of MiniPro.


The fourth member, TL-866, needs no introduction.
We will read-erase-write some chips, if the cases are not DIP, then we will use a set of MiniPro adapters. For Ezoflash - their own adapters, those that we managed to find among the rubble. Empty places in the table mean that the corresponding programmer cannot work with the tested chip.
We will also use another PC with a hardware LPT port.
The configuration is quite modern, DualCore Intel Core i3-4170, 3700 MHz, 4 GB RAM, motherboard Gigabyte GA-H81M-S2PV, SSD drive ADATA SP550, OS Windows 7 x32.
We will put the results of the research in a table, the time of each body movement is indicated in seconds.


There is an advantage in the speed of the basic operations of Usb programmers.
I did not check the operation of the programmer in the in-circuit programming mode - due to the lack of interest in these capabilities, I did not check the programming of microcontrollers either, because I am 146% sure in the capabilities of the device.
Summing up, I would like to highlight the main
Advantages of this programmer:
workmanship,
A wide range of supported chips, the list is constantly updated.
Cheap pin-2-pin adapters for the vast majority of microcircuits (except for the chipped SOP44 - DIP40, priced at indecent almost fifty ye)
Affordable price compared to similar devices with similar functionality.
Flaws: not yet found.
Thanks to everyone who read up to this point my first kreo on muse, I apologize in advance for possible tongue-tied language, I didn’t use Word, Russian is not my native language.
Yes, I repeat, the device was purchased for their hard-earned money. I plan to buy +30 Add to favorites Liked the review +75 +124

I found a photo in my archive, which captured the process of making a JTAG programmer, which I needed to revive satellite tuner. Now a little more about what kind of “beast” such a JTAG is:

JTAG(short for English. Joint Test Action Group; (pronounced J-tág) is the name of the working group that developed the IEEE 1149 standard. Later, this abbreviation became strongly associated with the specialized hardware interface developed by this group based on the IEEE 1149.1 standard. The official name of the standard Standard Test Access Port and Boundary-Scan Architecture. The interface is designed to connect complex digital microcircuits or PCB level devices to standard test and debug equipment. For those who are interested further, the full article is at wikipedia.

And now back to business, a satellite tuner came to me from friends, the most common and simple Globo on the Ali M3329B processor. With such symptoms, it didn’t turn on at all, at first I sinned on the power supply, but after ringing all the voltages with a multimeter, it turned out that everything was fine with the power supply. After studying a few different articles on repairing these receivers, I came to the conclusion that, judging by the symptoms, the firmware was completely lost, and you can restore it by flashing it through a JTAG programmer. There was also the thought that it had completely burned out and could not be restored, but I still preferred to believe that firmware via JTAG would help.

For manufacturing, I chose this scheme:

Power is supplied to the circuit from the receiver to which it is connected. The use of an external power supply for the circuit is not necessary for two reasons. Firstly, the current consumption is very small and does not create additional load on the receiver's power supply, and secondly, power from the same source as the processor with flash memory improves logic level matching.

The 74HC244 is not an inverting buffer. The microcircuit contains two independent four-bit buffers. Each buffer has its own output enable signal (active low). There are no Schmitt triggers on the inputs. The microcircuit is made according to the “fast” CMOS technology, which ensures high speed. The powerful current output makes it possible to maintain high speed even with a capacitive load. The performance of the 74HC244 is comparable to that of Schottky diodes, while the 74HC244 retains the advantages of CMOS chips, i.e. high noise immunity and low power consumption. The inputs of the microcircuit are protected from damage by static electricity using diodes.

Alas, I did not find 74HC244 in my stocks. I found only an analogue of 74F244, which differed slightly in the supply voltage Vcc. The 74HC244 has a recommended range of 2 to 6 V, while the 74F244 has a recommended range of 4.5 to 5.5 V. Although the maximum limits are from -0.5 to +7 V, I decided not to bother and start manufacturing.

Taking the original diagram in the first image, and redrawing it in the DipTrace program, the following diagram turned out:

Everything was routed automatically, not only one line was routed, but this problem was solved by two SMD jumpers. The image above shows the printed circuit board ready for fabrication.

On the board, I also signed all the outputs, but unfortunately I signed the output signals incorrectly, as you can see on the source 1- GND, 2-TCK, 3-TMS, 4-TDO, 5-TDI and 6-RST, but I did it GND, TMS, TCK, TDI, TDO, and RST, I made a mistake exactly when I signed contacts, everything is correct according to the scheme, according to the original source, i.e. 1- GND, 2- TCK, 3- TMS, 4- TDO, 5- TDI and 6- RST.

PCB with correct pin designation:

Actually the main thing is getinaks, a file, a small hand saw, sandpaper. A screwdriver and a cutter for splitting the getinaks into 2 parts, since I had a piece of foil on both sides, and our board is simple, one-sided.

Having done all the work, turning the getinaks to the dimensions of the board (approximately 55x50 mm), we take the COMET cleaning agent (Komet) in powder and a sponge for washing dishes. We clean getinaks from traces of grease and dirt. It is better not to wipe off the remaining water, but to let it dry like that.

While the getinax dries, we go to the computer and print our scheme on a laser printer and photo paper in mirror image, indicating the maximum print quality. It is important not to forget to put mirror reflection, otherwise, as a result, on the board we will get everything turned out!

And so, the getinax is ready, the printed circuit board is printed, carefully fitting the edges of the getinax to the pattern of the printed circuit board on photographic paper, we fasten it with sticky paper tape to the getinax, take the iron and set it to the maximum temperature.

Naturally foil side of the getinaks to the printed circuit board pattern.

When the iron has warmed up, pressing firmly, we begin to iron - evenly heating the getinaks from the side of the paper. We heat a board of this size for no more than 30-60 seconds, otherwise the toner will spread. I recommend setting a timer on your phone so that the time is near, before your eyes. When everything is done, let the board cool down.

We tear off the photo paper from the board, in front of us is a finished board, which remains to be etched in ferric chloride FeCl₃, if there are not big flaws, before etching, we correct the tracks with a scalpel and a thin disc marker.

In the process of etching with ferric chloride, it is necessary to continuously mix the solution, for example, by shaking the dishes. If the size of the board is not very large, you can put the board on the surface of the solution with the pattern down - no need to shake, but it is difficult to track the end of the etching process. The etching time with ferric chloride is from 5 to 50 minutes and depends on the temperature, the concentration of the solution and its contamination with copper, the thickness of the copper foil. After etching, the board must be rinsed with running water and dried.

As a result, we get this printed circuit board

We also clean the toner with Comet powder, it keeps well enough, and in order not to damage the board tracks, we clean it slowly.

After cleaning from the toner, we see a neat, beautiful printed circuit board


Now let's start soldering the elements:

2017-05-25 Last modified date: 2018-10-10

The article deals with: Features of the use of microcircuits NAND FLASH, page layout methods, and bad block management. Recommendations for programming on programmers.

CONTENT:

1. THEORY

1.1. The difference between NAND FLASH chips and conventional chips

If you do not delve into the intricacies of technology, then the difference between microcircuits NAND from other memory chips is as follows:

  • Microcircuits NAND have very large volume.
  • Microcircuits NAND can have bad (bad) blocks.
  • Page Size records is not a power of 2 .
  • Writing to a microchip carried out only pages , erasing - at least in blocks .

There are a few other differences, but the first two are the key ones. Causes the most problems presence of bad blocks.

1.2. Organization of NAND FLASH chips

Learn more about the organization and structure of microcircuits NAND can be read in the specialized literature, but we note that:

  • Microcircuits NAND organized in pages (pages), pages in blocks (bloks), blocks in logic modules (moon).
  • Page Size NAND not a multiple of power 2.
  • The page consists of basic and spare (spare) areas.

As intended by the developers NAND incore area must be found the data itself, a in spare (reserve) area - bad block markers, checksums main area, other service information.

If they talk about page size NAND chips 512 byte or 2K bytes, then we are talking about main area size pages, excluding spare.

1.3. Ways to Use a Page Spare Area

Let us recall once again that, according to the intention of the developers of NAND chips in the spare area should located: bad block markers, checksums main data area, other service information.

Most developers describe only location bad block markers in the supplied microcircuits. For other aspects of the use of the spare area, general recommendations are given and an algorithm for calculating the ECC, usually according to Haming. Samsung goes a step further with recommendations called " Spare area of ​​NAND flash memory. Destination standard "("NAND Flash Spare Area. Assignment Standard", 27. April. 2005, Memory Division, Samsung Electronics Co., Ltd).

So, this standard assumes the following use of the spare area:

For microcircuits with a page size of 2048+64 bytes t the main and spare area of ​​the page is divided into 4 fragments (sectors) each:

RegionSize (byte)Fragment
Main512 Sector 1
512 Sector 2
512 Sector 3
512 Sector 4
Spare16 Sector 1
16 Sector 2
16 Sector 3
16 Sector 4

Every fragment their main area is aligned spare area fragment.

Spare area usage (for each of the four tiles)
for chips with a page size of 2048 + 64 bytes:
Bias
(byte)
Size
(byte)
PurposeDescription
Bad block marker
reserved
Logical sector number
Reserved for sector number
reserved
ECC code for the main area of ​​the page
ECC code for logical sector number
reserved

But this is not the only "standard" for page memory allocation, only we know of several dozen of them, for example:

  • "NAND FLASH management under WinCE 5.0 ", NXP;
  • "Bad Block Management for NAND Flash using NX2LP ", December 15, 2006, Cypress Semiconductor;
  • "OLPC NAND Bad Block Management ", OLPC.

1.4. NAND image and binary image

You may encounter two options image for recording:

  1. Binary not broken to pages and no spare area.
    This option is possible if you are a device developer using NAND or received such a file from the developer. Such an image is suitable for writing to chips with pages of any size and any distribution of the spare area, you just need to know what method the spare area will be formed by.
  2. An image read from another chip (sample) containing a spare area with bad block markings, service information, and control codes.
    Such an image can be written only into the microcircuit exactly the same size pages and blocks.

Those specialists who are engaged in the repair of various equipment are more likely to encounter the second case. In such a case, it is often difficult to determine the spare area allocation method used and the bad block management method used.

1.5. Factory marking of bad blocks

The only thing more or less standardized is factory marking of bad blocks.

  • Bad blocks are marked on 0th or 1st page for chips with a page size of less than 4K.
  • For 4K pages and more, the marking may be on last page block.
  • Myself bad block marker is located in the page spare area at byte 5 for small pages (512 bytes) and byte 0 for large pages (2K).
  • Bad block marker may matter 0x00 or 0xF0 for small pages and 0x00 for more X.
  • good blocks always labeled 0xFF.
  • In any case, the value other than 0xFF programmer perceives as bad block marker.
  • Typically, in modern NAND the bad block is completely filled with the value 0x00.

There is one problem: bad block can be erased. In this way, you can lose information about bad blocks of the microcircuit.

However, if the microcircuit has already worked in the device, this method of marking bad blocks is not always used. Sometimes even information about bad blocks is not stored in NAND memory. But, most often, even if the device software developer uses a different bad block management scheme, he prefers not to erase the factory markup.

1.6. Bad block management

Developers NAND microcircuits suggest using the following bad block control schemes:

  • Pass bad blocks
  • Usage spare areas

Also, methods for managing bad blocks sometimes include the use of error correction(ECC). It should be noted that the use of single error correction does not eliminate multiple errors and still forces one of the above schemes to be used. In addition, most NAND microcircuits have a guaranteed fail-safe region in which bad blocks do not appear. The fail-safe region is usually located at the beginning of the chip.

These methods of managing bad blocks are well described in the technical documentation of manufacturers. NAND and widely discussed in the literature on the use NAND. However, let us briefly recall their essence:

Skip bad blocks:
If the current block is bad, it is skipped and the information is written to the next free block. This scheme is universal, easy to implement, but somewhat problematic for cases where bad blocks appear during operation. For the full operation of this scheme, the logical number of the block must be stored inside the block (the standard for assigning a spare area from Samsung, this is actually what it assumes). When working according to this scheme, the controller must somewhere store a table of correspondence between logical block numbers and their physical numbers, otherwise memory access will be greatly slowed down.

Therefore, the logical development is the scheme spare area usage:
According to this method, the entire amount of memory is divided into two parts: the main and the backup. When a bad block appears in the main memory, it is replaced by a block from the spare memory, and a corresponding entry is made in the block remapping table. The remapping table is stored either in a guaranteed failsafe block or in multiple instances. The table format is different, it is stored in different places. Again, Samsung describes a standard for the format and layout of the table, but few people follow it.

2. PRACTICE

2.1. Scanning for bad NAND blocks

programmer ChipStar allows you to quickly scan the chip NAND for the presence of bad blocks in accordance with the factory marking of bad blocks.

Select menu item " Chip|Look for bad blocks ", the chip will be checked for bad blocks. The result is shown in a table.

This action is only necessary if you just want to see the list of bad blocks. In all other cases, the search for bad blocks is performed automatically when necessary.

2.2. Bad blocks in the NAND image

When reading the image of the NAND chip, the programmer additionally saves information about the size of the page and the chip block. The information is saved in a separate file. So if you read and saved the image of the microcircuit in a file <имя_файла>.nbin the program will create another file: <имя_файла>.cfs . When opening a file <имя_файла>.nbin file <имя_файла>.cfs will be counted as well. In file <имя_файла>.cfs information about the size of the page and the chip block is recorded. After reading the chip or opening a file like .nbin , a background scan of the image for bad blocks is performed based on page and block size information.

Parameters NAND and information about bad blocks can be viewed in the tab " NAND"Programmer editor:

binary image NAND can be viewed under the main memory ":

In editor mode NAND the page's spare area is highlighted duller color, buttons for moving through pages, blocks and quickly jumping to the beginning of the spare area also become available current page. In the editor status line, in addition to the cursor address, it additionally displays page number and block number where the cursor is located. All this allows you to more conveniently view the contents of the chip.

2.3 Erase NAND

Default programmer does not erase bad blocks, but if you turn off the option " Checking and skipping bad blocks " bad blocks may be erased and bad block markup may be lost. Disable this option only if necessary.

Only bad blocks marked according to the factory markings are skipped. If the device uses other bad block markings, they will be erased because the programmer software will not see them. To work with non-standard markups of bad blocks, the programmer can use external plugins.

2.4. Testing the microcircuit for the absence of a record

By default, the programmer ignores all bad blocks when checking, but if you disable the " Scanning and skipping bad blocks " bad blocks will be checked which will naturally lead to testing errors.

2.5. Writing the finished image to the chip

Image recording NAND in a microcircuit is somewhat different from the usual FLASH microchips. First of all, they must match page sizes image and target chip. If bad block management is used, must match block sizes images and microchips.

Software for all programmers ChipStar supports three methods for managing bad blocks built-in tools and an unlimited number using plugins. In addition, you can set the number of writeable blocks at the beginning of the chip, which is actually fourth way to manage bad blocks.

Method 1: Ignore Bad Blocks

Simple copying, ignoring bad blocks (bad blocks are written in the same way as normal ones).

original image Chip
(the initial state)
Chip
(result)
Block 0
good
Block
clean
Block 0
good
Block 1
bad
Block
clean
Block 1
false
Block 2
good
Block
clean
Block 2
good
Block 3
good
Block
bad
Block 3
faulty
Block 4
good
Block
clean
Block 4
good
Recording boundary
Block 5
good
Block
clean
Block
clean

Most suitable for copying NAND chips, without delving into its internal structure, provided that the chip to be written does not contain bad blocks . If in the original image bad blocks were present , eventually forming false bad blocks . The appearance of false bad blocks will not affect the operation of the device. However, if the chip already contains bad blocks, bad blocks will appear when trying to write to such a chip, with unpredictable consequences. Tip: you can try to erase the chip completely, including bad blocks, then copy it. If writing to a bad block succeeds (this often happens), your device will function correctly, in the future, the device software will identify the bad block and replace it with a good one in accordance with its operation algorithm.

Method 2: bypass bad blocks

original image Chip
(the initial state)
Chip
(result)
Block 0
good
Block
clean
Block 0
good
Block 1
bad
Block
clean
Block
clean
Block 2
good
Block
clean
Block 2
good
Block 3
good
Block
bad
Block
bad
Block 4
good
Block
clean
Block 4
good
Recording boundary
Block 5
good
Block
clean
Block
clean

Bypassing bad blocks no bad blocks are written from the source image and information is not written to bad blocks of the microcircuit. This is not the best copy policy, but it is safe against bad chip blocks: no information is lost about bad chip blocks and no false bad blocks appear. In some cases, such a copy policy can help restore the functionality of an unknown device.

Method 3: Skip Bad Blocks

original image Chip
(the initial state)
Chip
(result)
Block 0
good
Block
clean
Block 0
good
Block 1
bad

Block
clean
Block 2
good
Block 2
good
Block
clean
Block 3
good
Block 3
good
Block
bad
Block
bad
Block 4
good
Block
clean
Block 4
good
Recording boundary
Block 5
good
Block
clean
Block
clean

Recording skipping bad blocks assumes that the device uses just such a bad block management algorithm, and not some other. Under these conditions, correct copying of information is guaranteed.

Method 4: Write Only the Guaranteed Safe Area

original image Chip
(the initial state)
Chip
(result)
Block 0
good
Block
clean
Block 0
good
Block 2
good
Block
clean
Block 1
good
Recording boundary
Block
bad
Block
clean
Block
clean
Block 3
good
Block
bad
Block
bad
Block 4
good
Block
clean
Block
clean
Block 5
good

Block
clean

Block
clean

In most modern NAND microcircuits, the first blocks (at least one) are guaranteed to have no failures. In many devices, the bootloader code is located at the beginning of the chip and operating system devices. It is often sufficient to copy only these areas.

Specify the recorded size in blocks in the recording modes settings dialog.

Other Ways to Manage Bad Blocks

Software ChipStar programmers supports any bad block management algorithms NAND using external plugins. If plugins are installed, descriptions of additional methods appear in the " Managing Bad NAND Blocks ". You can configure the parameters of the selected method by clicking the " External plugin ".

Using Error Correcting Codes (ECC)

The use of error-correcting codes allows recover single errors on the NAND page.

Various algorithms can be used to recover single errors in a sector. Depending on the algorithm ECC, a different number of errors per sector (512+16 bytes) can be recovered. under the term " single "understood error in only one bit data. For NAND with a page size of 512 + 16 bytes, the concept of " sector" and " page" match. For NAND with large page sizes, the ChipStar programmer uses a sector paging scheme as described. In the recording or verification settings, you can specify how many errors per sector the algorithm used in your device can correct. Accordingly, microcircuits with an acceptable number of errors will not be rejected, information on the number of correctable errors is displayed in the statistics window:

Information on the number of allowed errors per sector for each specific chip can be found in documentation to the microchip. All newly added NAND chips are entered into the programmer's database, taking into account the number of allowable errors.

By self-adding microchips:

  • if supported by ONFI, then the allowable number of errors per sector read from the chip parameter table and installed to the correct value.
  • if the chip does not support ONFI, user should set the value yourself using the documentation for the chip.

For new chips NAND production Samsung the value of the allowed number of errors per sector is encoded as part of the chip identifier. Therefore, for such chips, the allowable number of errors per sector will also be set correctly.

When reading the contents of the microcircuit for the purpose of its further storage or copying, single errors cannot be reliably detected. The resulting image can then be separately analyzed for errors by computing ECC check codes by an external application, provided that exactly the algorithm used and the page markup are known .

The ChipStar programmer software offers an indirect statistical method for identifying and eliminating single errors. The method only reveals unstable errors with not guaranteed credibility. To perform reading with error detection, you need to select the " Selective reading" and on the tab "NAND" check the box " Enable Error Correction Mode"

You can set the number of read retries to compare and the total number of read retries on error. It should be borne in mind that the use this method the creature slows down the reading process.

The statistical error detection algorithm works as follows:

  1. The NAND page is read several times in a row (at least three).
  2. The read data is compared byte by byte.
  3. If no comparison errors are found, the page is assumed to be error-free.
  4. If errors are found during the comparison, the page is read a few more times.
  5. For each error, the number of read units and zeros.
  6. The correct value ("0" or "1") is considered, which turned out to be more.

The algorithm works well if the probability of an error in a particular bit of the microcircuit is less than 0.5. When reading a microcircuit, "corrected" errors and the probability of correct reading are counted.

2.6. Convert Binary Image to NAND Image

Everything described above was more about copying NAND and records according to the chip pattern, however, it is often necessary write the original binary image of the program into a clean chip. Before writing, you need to convert the binary image to a NAND image by adding to each page spare area and fill it out correctly. To do this, open your binary, select the menu item " ". A dialog will appear:

Set the conversion mode to NAND format: " Binary image... ", specify the page and NAND block size, or select the required chip. Select the format of the spare area. The programmer supports simple filling of the area with FF values ​​with built-in tools and other methods using plug-ins. A plug-in that implements the spare area assignments recommended by Samsung is supplied with the programmer.

If you need to implement any another distribution option - let us know and we will prepare the appropriate plugin, or you can implement the required plugin yourself.

2.7. Compatibility with NAND images read by other programmers

if you have NAND image, read by another programmer or obtained from another source, it must be convert into a writable format ChipStar programmer.

To do this, follow these steps:

  • Open your file, select menu item " Edit|Toggle NAND editor mode ". A dialog will appear as shown above.
  • Set the conversion mode to format NAND: "The image is already NAND ... ", indicate page size and block NAND or select the required chip. Click " Continue".
  • A tab will appear in the editor NAND " and the image will start scanning for bad blocks.
  • The resulting file can be saved as NAND, the file will get the extension .nbin default.

2019-12-30 Date latest update programs: 2019-12-30

Two-faced Janus

We decided to call this programmer " Janus".

Why is that? Because in Roman mythology, Janus is two-faced god of doors, entrances and exits, as well as beginning and end. What is the connection? Why our programmer ChipStar-Janus two-faced?

And here's why:

  • From one side, this programmer is simple. Spread like free project, it can easy to make yourself.
  • From the other side, it is developed by the company, for a long time professionally engaged development and production of various radio-electronic equipment, including programmers.
  • From one side, this programmer is simple, at first glance it has not very impressive characteristics.
  • From the other side, works in conjunction with professional program (by the way, exactly the same as other professional ChipStar programmers).
  • From one side, we offer this programmer for free free assemblies.
  • From one side, we also sell it in finished form, as a regular budget product.
  • From one side, the homemade programmer is not covered by the warranty (which is natural).
  • From one side, if you were able to assemble it, then you can repair it, and the programmer is so simple that, in fact, there is nothing to break.
  • From one side, it's simple in-circuit programmer.
  • From one side, through simple expansion adapters, it supports programming NAND FLASH and other microcircuits are already "in the socket".

So the programmer ChipStar Janus for many specialists, it can be a real way out in a situation where different simple or amateur programmers are no longer enough, and a more complex programmer seems redundant or there is not enough allocated budget for it.

What prompted us to develop this programmer.

There are a great many simple specialized programmers suitable for self-manufacturing.

There are many cheap Chinese programmers already prepared.

There are quite a few amateur development, often superior in quality to the latter.

It would seem, what is the point of another craft?

For a long time we have been developing, manufacturing and supporting universal programmers, mainly for purposes. We have a wealth of experience working with a variety of microcircuits. Often we are approached by people who have already assembled, and often bought, one of the above-mentioned "products". It is often impossible for our specialists to look at circuit solutions, build quality and, especially, at the software of these devices without laughter / tears / horror (underline as necessary). Well, when the programmer costs "three kopecks", I bought it, something works, something does not work, but the money is not big. But often the price/capability ratio of such devices surprises us, to put it mildly. I want to exclaim: it's not worth that much!

In addition to all of the above, there is a special category of programmers suitable for self-production - these are programmers (more precisely, programmer circuits and software) developed by specialists from companies producing microcircuits (mainly microcontrollers). Such programmers are designed quite professionally, there are no "blunders" in their circuitry. They support all declared chips. But there are two "small" drawbacks: the list of programmable microcircuits is very limited (which is quite understandable) and the software is very spartan - no extra features, as a rule - only erase, write down, verify. Often even functions reading no microchip.

So the programmer ChipStar Janus in the initial configuration, it is an in-circuit programmer. In this mode, it supports microcontrollers PIC and AVR firms Microchip, some microcontroller architectures MCS51, microcontrollers STMicroelectronics and a number of others, as well as serial memory chips with an interface I2C(basically episode 24). You can connect the simplest adapters to the programmer's expansion connector and start programming memory chips "in the socket".

Programming "in the socket" is now implemented:

  1. EPROM) with interface I2C(series 24xx);
  2. serial flash memory chips (Serial FLASH) with interface SPI (SPI Flash);
  3. serial memory chips (Serial EPROM) with interface MW (93xx series);
  4. microchips NAND FLASH;

The programmer and software supports the technology of self-adding microcircuits in three clicks. So far, the addition of microcircuits has been implemented NAND and I2C. In the very near future, it is planned to implement this technology for MW chips ( 93xx series) and AVR. Thus, you get not just a programmer, but powerful tool for independent work.

Three Ways to Get a ChipStar-Janus Programmer

1st way:
Assemble the programmer yourself completely

The method is suitable for those who have the time, experience and desire, but limited financial resources. Or just curious.

Action algorithm:

2nd way:
Assemble the programmer yourself by purchasing a ready-made printed circuit board and a flashed microcontroller

The method is similar to the previous one, only you will save yourself from the most difficult operations: the manufacture of printed circuit boards and microcontroller firmware without a programmer.

Action algorithm:

  1. Read the terms of use of the self-assembled programmer.
  2. Read the instructions for assembling the programmer.
  3. Download full documentation for the programmer.
  4. Buy an assembly kit (ready-made printed circuit board and microcontroller with already written firmware).
  5. Purchase the necessary equipment for assembling the programmer according to