1*0d6140beSAndroid Build Coastguard Worker===================== 2*0d6140beSAndroid Build Coastguard WorkerIn-System Programming 3*0d6140beSAndroid Build Coastguard Worker===================== 4*0d6140beSAndroid Build Coastguard Worker 5*0d6140beSAndroid Build Coastguard Worker**In-System Programming** (ISP) sometimes also called **in situ programming** is used to describe 6*0d6140beSAndroid Build Coastguard Workerthe procedure of writing a flash chip while it is (already/still) attached to the circuit 7*0d6140beSAndroid Build Coastguard Workerit is to be used with. Of course any normal "BIOS flash" procedure is a kind of ISP 8*0d6140beSAndroid Build Coastguard Workerbut when we refer to ISP we usually mean something different: programming a flash chip by external means 9*0d6140beSAndroid Build Coastguard Workerwhile it is mounted on a motherboard. 10*0d6140beSAndroid Build Coastguard Worker 11*0d6140beSAndroid Build Coastguard WorkerThis is usually done with SPI chips only. Some mainboards have a special header for this 12*0d6140beSAndroid Build Coastguard Worker(often named "ISP", "ISP1", or "SPI") and there should be no problem with accessing the chip 13*0d6140beSAndroid Build Coastguard Workerthen as long as the wires are not too long. 14*0d6140beSAndroid Build Coastguard Worker 15*0d6140beSAndroid Build Coastguard WorkerIf there is no special header then using a special SO(IC) clip is an easy and reliable way 16*0d6140beSAndroid Build Coastguard Workerto attach an external programmer. They are produced by different vendors (e.g. Pomona, 3M) 17*0d6140beSAndroid Build Coastguard Workerand are available from many distributors (e.g. Distrelec) for 20-50$/€. 18*0d6140beSAndroid Build Coastguard Worker 19*0d6140beSAndroid Build Coastguard WorkerProblems 20*0d6140beSAndroid Build Coastguard Worker======== 21*0d6140beSAndroid Build Coastguard Worker 22*0d6140beSAndroid Build Coastguard Worker* Check the other potential problems (:doc:`misc_notes`) with other types of programming setups first. 23*0d6140beSAndroid Build Coastguard Worker* The SPI bus is not isolated enough. Often parts of the chipset are powered on partially 24*0d6140beSAndroid Build Coastguard Worker (by the voltage supplied via the Vcc pin of the flash chip). In that case 25*0d6140beSAndroid Build Coastguard Worker disconnect Vcc from the programmer and power it with its normal PSU and: 26*0d6140beSAndroid Build Coastguard Worker 27*0d6140beSAndroid Build Coastguard Worker * Try powering up the board normally and holding it in reset (e.g. use a jumper instead of the reset push button). 28*0d6140beSAndroid Build Coastguard Worker * Some chipsets (e.g. Intel ICHs/PCHs) have edge triggered resets. In this case holding them in reset will not work. 29*0d6140beSAndroid Build Coastguard Worker This is especially a problem with Intel chipsets because they contain an EC (named ME by Intel, see :doc:`management_engine`), 30*0d6140beSAndroid Build Coastguard Worker which uses the flash (r/w!). In this case you can trigger the reset line in short intervals. 31*0d6140beSAndroid Build Coastguard Worker For example by connecting it to the chip select (CS) line of the SPI bus or a dedicated clock signal from the programmer. 32*0d6140beSAndroid Build Coastguard Worker This should not be too fast though! Reset lines usually require pulses with a minimum duration. 33*0d6140beSAndroid Build Coastguard Worker * On some boards, you can try disconnecting the ATX12V header (yellow/black wires only) from the motherboard, 34*0d6140beSAndroid Build Coastguard Worker or even remove the CPU or RAM - if the programmer supports SPI sniffing, you may be able to verify that the there is no SPI traffic. 35*0d6140beSAndroid Build Coastguard Worker 36*0d6140beSAndroid Build Coastguard WorkerImages 37*0d6140beSAndroid Build Coastguard Worker======== 38*0d6140beSAndroid Build Coastguard Worker 39*0d6140beSAndroid Build Coastguard WorkerPomona 8-pin SOIC clip with attached jumper wires. 40*0d6140beSAndroid Build Coastguard Worker 41*0d6140beSAndroid Build Coastguard Worker.. image:: Pomona_5250_soic8.jpg 42*0d6140beSAndroid Build Coastguard Worker 43*0d6140beSAndroid Build Coastguard WorkerA cheap, but very fragile alternative: DIP socket as clip 44*0d6140beSAndroid Build Coastguard Worker 45*0d6140beSAndroid Build Coastguard Worker.. image:: 1200px-DIP_socket_as_SOIC_clip.jpg 46