1805 views|0 replies

2015

Posts

0

Resources
The OP
 

What are the differences between the three programming methods ISP, IAP and ICP? [Copy link]

I have never been able to figure out the difference between them. Today, I looked up some information and summarized them as follows. ISP: In System Programing IAP: In applicaTIng Programing ICP: In Circuit Programing ISP means that programming can be done at the board level, that is, the chip does not need to be removed, and the entire program is written, usually through the ISP interface line. IAP is also programmed at the board level, but it is programmed by oneself, that is, programming in the application, that is, only a certain part can be changed without affecting other parts of the system. In addition, the interface program is written by oneself, so it can be upgraded remotely without affecting the application. Let me make an analogy: 1. ISP is to tear down a house and build a new one. Of course, people cannot live in it before it is built! 2. IAP is to make some renovations in the built house. Of course, people can continue to live in it! ICP is in-circuit programming, which is the programming method of LPC chip, equivalent to ATMEL's ISP, and LPC's ISP is equivalent to ATMEL's IAP. The difference between ISP and IAP ISP: in system programming, IAP: in application programming But what are the differences in their operation methods, results and applications? What is ISP: The code is burned in with a writer. However, the chip can be on the target board without being taken out. The interface is designed on it when the target board is designed, so it is called "in system programming", that is, without leaving the system; What is IAP: In application programming, the chip itself (or through an external chip) can write the code through a series of operations. For example, a single-chip computer that supports IAP is divided into 3 program areas: 1 for the boot program area, 2 for the running program area, and 3 for the download area. The chip receives the download command through the serial port, enters the boot area to run the boot program, and downloads the new code content to the download area under the boot program. After the download is completed and verified, the content of the download area is copied to area 2, and the reset program is run, then IAP is completed; Application scenarios: 1. ISP program upgrades need to be solved on site, but the better thing is that the machine does not need to be disassembled; 2. If there is a network management system for IAP, everything can be done by downloading with the network management system, and people do not have to run around. This may be their advantage or application There are currently two ways to implement online programming: In-System Programming (ISP) and In-Application Programming (IAP). ISP generally programs the Flash memory inside the microcontroller through the microcontroller's dedicated serial programming interface, while IAP technology maps the Flash memory into two storage banks from a structural perspective. When the user program on one storage bank is running, the other storage bank can be reprogrammed, and then the control is transferred from one storage bank to the other. The implementation of ISP generally requires very little external circuit assistance, while the implementation of IAP is more flexible. Usually, the serial port of the microcontroller can be connected to the RS232 port of the computer to program the internal memory through a specially designed firmware program. ISP and IAP are very similar. Both do not require the chip to be pulled out of the board, and the purpose of upgrading to a new version can be achieved using the PC-MCU programming interface (JTAG, serial port, twisted pair, SPI, etc.). The MCU first executes an independent Boot code (this Boot code is usually factory preset or burned using a programmer, usually only 1k or 4k, SST usually occupies an independent block, Philips usually lets the BootROM address overlap with other Flash to achieve a hidden effect), Boot is responsible for controlling the code that erases the program memory and programs the program memory (or the execution code provided by the processor outside), and then through a communication method with the PC computer (such as the ether network port), a user-specified MCU executable binary code file compiled on the PC is programmed into the program memory in the MCU. The biggest difference between ISP and IAP is: who triggers it. ISP has 4 triggering modes: 1. By external hardware circuit: such as VDD keeps high level, giving RST 3 consecutive pulses; 2. Detection status bit: such as ISPEN, when it is 0, the PC pointer starts to execute from 0000H; when it is 1, the position of "ISP code" is calculated through "boot vector". This status bit will be detected after each reset; 3. The abort control character signal triggers chip reset: The abort control character signal refers to the low level of up to one frame length appearing on the receiving pin of the asynchronous serial port. Here, the length of one frame is related to the working mode of the asynchronous serial port. 4.Directly call ISP: User programs can also call it, but it is very dangerous. The purpose of the four methods is the same - to enter the ISP subroutine. For example, the ISP subroutine shipped by Philips is at 1E00H-1FFFH. As long as the PC pointer can be guided to point to 1E00H, it will be fine. The purpose of entering the ISP code is to enter the BootROM. The triggering of IAP is relatively simple, without external triggering. Through some indicator bits (SST is SC0/SC1, SFCFhilips is a section of IAP subroutine, saved in the address space of FF00H~FFFFH), the purpose of booting to the BootROM is achieved. Different paths lead to the same end. The Boot code residing in the BootROM entered by ISP and IAP is the ultimate goal. The last one: parallel programming mode. No need for BootROM, just set multiple pins of the chip to let the chip recognize commands (such as: erase, write, verify, etc.), pass the address and data from the P port, and then write to the Flash. Using the IAP of LPC2000, you can allocate the FLASH space yourself, specify a BLOCK to store your data, and then write through IAP. After each boot, read your data from this BLOCK. Implementation of IAP Usually when users need to implement the IAP function, that is, the user program updates itself during operation, it is necessary to write two project codes when designing the firmware program. The first project program does not perform normal functional operations, but only receives programs or data through some communication channel (such as USB, USART) to execute the update of the second part of the code; the second project code is the real functional code. Both parts of project code are burned into User Flash at the same time. When the chip is powered on, the first project code starts to run first. It performs the following operations: 1) Check whether the second part of the code needs to be updated 2) If no update is needed, go to 4) 3) Execute the update operation 4) Jump to the second part of the code to execute The first part of the code must be burned in through other means, such as JTAG or ISP; the second part of the code can be burned in using the IAP function of the first part of the code, or it can be burned in together with the first part of the code. If the program needs to be updated in the future, it can be updated through the IAP code of the first part. For STM32, because its interrupt vector table is located in the lowest address area of the program memory, in order to enable the first part of the code to respond to interrupts correctly, the first part of the code is usually arranged in the beginning area of the Flash, and the second part of the code follows it. When the second part of the code starts to execute, it is first necessary to map the CPU's interrupt vector table to its own vector table, and then perform other operations. If the IAP program is damaged, the product must be returned to the factory to re-burn the program, which is very troublesome and very time-consuming and costly. In response to such a demand, STM32 automatically sets the first 4 pages of the user Flash area to write protection while implementing read protection on the Flash area, which can effectively ensure that the IAP program (the first part of the code) area will not be accidentally damaged. ISP (In-System Programming) means that blank devices on the circuit board can be programmed with end-user code without removing the device from the circuit board. Programmed devices can also be erased or reprogrammed using ISP. IAP (In-Application Programming) means that the MCU can obtain new code in the system and reprogram itself, that is, the program can be changed by the program. ISP and IAP technologies are the development direction of future instruments and meters. 1 Working principle of ISP and IAP The implementation of ISP is relatively simple. Generally speaking, the internal memory can be rewritten by the software of the host computer through the serial port. For a single-chip microcomputer, it can receive data from the host computer through SPI or other serial interfaces and write it into the memory. Therefore, even if we solder the chip on the circuit board, as long as we leave this serial port for the host computer interface, we can rewrite the internal memory of the chip without removing the chip. The implementation of IAP is relatively complicated. When implementing the IAP function, there must be two storage areas inside the microcontroller, one of which is generally called the BOOT area and the other is called the storage area. The microcontroller is powered on and runs in the BOOT area. If the conditions for external rewriting of the program are met, the program in the storage area is rewritten. If the conditions for external rewriting of the program are not met, the program pointer jumps to the storage area and starts executing the program placed in the storage area, thus realizing the IAP function. 2 Application of ISP and IAP in MCU 2.1 Disadvantages of Traditional Programming Methods In general MCU experiments or development, programmers are indispensable devices. The simulated and debugged programs need to be burned into the internal or external program memory of the MCU with the help of a programmer. The price of ordinary programmers ranges from a few hundred yuan to a few thousand yuan, which is still a considerable expense for general MCU users. In addition, during the development process, every time the program is changed, the chip on the circuit board must be unplugged and programmed and then plugged in again. This is not only troublesome but also easy to damage the chip and circuit board. In addition, when the program needs to be upgraded or modified, the equipment must be returned to the factory or the technicians must go to the site for operation, which is not only inconvenient but also causes cost waste. 2.2 Advantages of ISP and IAP The advantage of ISP technology is that it does not require a programmer to conduct experiments and development of single-chip microcomputers. The single-chip microcomputer chip can be directly soldered to the circuit board, and the finished product is completed after debugging. This eliminates the inconvenience caused by frequent insertion and removal of chips to the chip and circuit board during debugging. IAP technology maps the Flash memory into two storage banks from a structural perspective. When the user program on one storage bank is running, the other storage bank can be reprogrammed, and then the program is transferred from one storage bank to another. The implementation of ISP generally requires very little external circuit assistance, while the implementation of IAP is more flexible. It can usually use the serial port of the single-chip microcomputer to connect to the RS232 port of the computer, and program the internal memory through a specially designed firmware program. It can be easily upgraded and maintained remotely through the existing INTERNET or other communication methods. 2.3 Product Analysis Currently, many MCUs on the market have ISP and IAP functions. ST's μPSD32&TImes;× series MCUs have 128KB/256KB FLASH memory and 32KB Boot ROM on-chip, and can easily implement ISP function through JTAG serial port. IAP function can be implemented by users in applications. ATMEL's MCU AT89S8252 provides an SPI serial interface for programming the internal program memory (ISP). The biggest feature of SST's single-chip microcomputer SST89C54 is that it has two independent FLASH memories inside, and has the IAP (in-application online programming) function. It can directly replace other companies' single-chip microcomputers (ATMEL, WINBOND, ISSI) of the 8052 series, without any changes to the software and hardware. PHILIPS's P89C51RX2xx series is an 8-bit Flash single-chip microcomputer with ISP/IAP. In order to promote ISP and IAP technologies, PHILIPS provides free Boot ROM firmware on the chip, and cleverly solves the firmware and FLASH address coverage problems and some specific implementation details, making their implementation simple. In addition, among the peripheral devices, ST's PSD series products have large-capacity memory on the chip, supporting ISP and IAP functions. ISP, In System Programing Mainly refers to the way of burning the chip. In the past, the chip needed to be taken off the circuit and burned with a programmer. In other words, the chip could not be written without leaving the application system. ISP mainly addresses this problem and uses JTAG or serial port (MCU has a Boot Loader inside, which is activated by a specified method. It can communicate with PC or other host computers through the serial port, and the internal program/settings do not need to be updated without leaving the application system) to burn the program. Therefore, MCU with ISP function can be programmed without using a programmer. Of course, the implementation of ISP may require some hardware circuit support, which is explained in the data sheet. IAP, In Application Programing The microcontroller has some erasable non-volatile memory inside, such as Flash. When the MCU is running independently, the MCU without IAP function cannot modify the data of Flash, for example, modify the code and data of a module of itself. MCU with IAP function can modify itself by using the technology developed by each company. In short: ISP=》Modifying the internal data of MCU requires external intervention; IAP=》Modifying the internal data of MCU does not require external intervention. The two can be said to be a mechanism for data update. Generally, after having ISP function, programmer is not needed, but download line is used for programming. But it does not mean that they do not support programmer, and specific models are analyzed. Whether emulator is needed for simulation is not necessarily related to whether ISP and IAP are available. It is just that with IAP function, monitoring program can be written in MCU to simulate an emulator. Of course, this monitoring program consumes resources, which is different from the emulator using hardware. IAP may be more commonly used on 51, which is the SoftICE function released by SST. Its MCU does not actually have ISP function, and you need to use a programmer to burn a Boot Loader into it, and then, using the IAP function, you can download data through the serial port. SST uses a SoftICE software developed by itself and the Mon51 interface of Keil C. According to the DataSheet, you need to use a programmer to burn the Boot Loader into it, and then use the serial port to burn the SoftICE into it, and then you can use it. 3 Product Analysis Currently, many MCUs on the market have ISP and IAP functions. ST's μPSD32&TImes;× series MCUs have 128KB/256KB FLASH memory and 32KB Boot ROM on-chip, and can easily implement ISP function through JTAG serial port. IAP function can be implemented by users in applications. ATMEL's MCU AT89S8252 provides an SPI serial interface for internal program memory programming (ISP). SST's MCU SST89C54, its biggest feature is that it has two independent FLASH memories inside, with IAP (in-application online programming) function, and can directly replace 8052 series MCUs of other companies (ATMEL, WINBOND, ISSI) without any changes to the software and hardware. PHILIPS's P89C51RX2xx series is an 8-bit Flash microcontroller with ISP/IAP. In order to promote ISP and IAP technologies, PHILIPS provides free Boot ROM firmware on the chip, and cleverly solves the address coverage problem of firmware and FLASH and some specific implementation details, making their implementation simple. In addition, among the peripheral devices, ST's PSD series products have large-capacity memory on the chip and support ISP and IAP functions. ISP, In System Programing Mainly refers to the way of burning the chip. In the past, the chip needed to be taken down, away from the circuit, and burned with a programmer. In other words, the chip cannot be written without being separated from the application system. ISP mainly targets this problem, using JTAG or serial port (MCU has a Boot Loader inside, which is activated in a specified way. It can communicate with PC or other host computers through the serial port, and update the internal program/settings without leaving the application system) to burn the program. Therefore, MCU with ISP function can be programmed without using a programmer. Of course, the implementation of ISP may require some hardware circuit support, which is described in the data manual. IAP, In Application Programing The microcontroller has some erasable non-volatile memory inside, such as Flash. When the microcontroller runs independently, the microcontroller without IAP function cannot modify the data in Flash, for example, modify the code and data of a module of itself. MCU with IAP function can modify itself by using the technology developed by each company. In short: ISP=》Modifying the internal data of MCU requires external intervention; IAP=》Modifying the internal data of MCU does not require external intervention. The two can be said to be a mechanism for implementing data updates. Generally, after having the ISP function, a programmer is not needed, and a download cable is used for programming. However, it does not mean that they do not support programmers. The specific model is analyzed specifically. Whether an emulator is needed for simulation has no necessary connection with whether ISP and IAP are available. It is just that with the IAP function, a monitoring program can be written into the MCU to simulate an emulator. Of course, this monitoring program consumes resources and is different from the emulator using hardware. The application of IAP may be more on 51, which is the SoftICE function produced by SST. His MCU does not actually have the ISP function, and a Boot Loader needs to be burned into it using a programmer. Then, using the IAP function, data can be downloaded through the serial port. The one from SST uses a SoftICE software developed by itself, which interfaces with the Mon51 of Keil C. According to the DataSheet, you need to use a programmer to burn the Boot Loader into it first, and then use the serial port to burn the SoftICE into it, and then you can use it. 3 Product Analysis Currently, many MCUs on the market have ISP and IAP functions. ST's μPSD32&TImes;× series MCUs have 128KB/256KB FLASH memory and 32KB Boot ROM on-chip, and can easily implement ISP function through JTAG serial port. IAP function can be implemented by users in applications. ATMEL's MCU AT89S8252 provides an SPI serial interface for internal program memory programming (ISP). SST's MCU SST89C54, its biggest feature is that it has two independent FLASH memories inside, with IAP (in-application online programming) function, and can directly replace 8052 series MCUs of other companies (ATMEL, WINBOND, ISSI) without any changes to the software and hardware. PHILIPS's P89C51RX2xx series is an 8-bit Flash microcontroller with ISP/IAP. In order to promote ISP and IAP technologies, PHILIPS provides free Boot ROM firmware on the chip, and cleverly solves the address coverage problem of firmware and FLASH and some specific implementation details, making their implementation simple. In addition, among the peripheral devices, ST's PSD series products have large-capacity memory on the chip and support ISP and IAP functions. ISP, In System Programing Mainly refers to the way of burning the chip. In the past, the chip needed to be taken down, away from the circuit, and burned with a programmer. In other words, the chip cannot be written without being separated from the application system. ISP mainly targets this problem, using JTAG or serial port (MCU has a Boot Loader inside, which is activated in a specified way. It can communicate with PC or other host computers through the serial port, and update the internal program/settings without leaving the application system) to burn the program. Therefore, MCU with ISP function can be programmed without using a programmer. Of course, the implementation of ISP may require some hardware circuit support, which is described in the data manual. IAP, In Application Programing The microcontroller has some erasable non-volatile memory inside, such as Flash. When the microcontroller runs independently, the microcontroller without IAP function cannot modify the data in Flash, for example, modify the code and data of a module of itself. MCU with IAP function can modify itself by using the technology developed by each company. In short: ISP=》Modifying the internal data of MCU requires external intervention; IAP=》Modifying the internal data of MCU does not require external intervention. The two can be said to be a mechanism for implementing data updates. Generally, after having the ISP function, a programmer is not needed, and a download cable is used for programming. However, it does not mean that they do not support programmers. The specific model is analyzed specifically. Whether an emulator is needed for simulation has no necessary connection with whether ISP and IAP are available. It is just that with the IAP function, a monitoring program can be written into the MCU to simulate an emulator. Of course, this monitoring program consumes resources and is different from the emulator using hardware. The application of IAP may be more on 51, which is the SoftICE function produced by SST. His MCU does not actually have the ISP function, and a Boot Loader needs to be burned into it using a programmer. Then, using the IAP function, data can be downloaded through the serial port. The one from SST uses a SoftICE software developed by itself, which interfaces with the Mon51 of Keil C. According to the DataSheet, you need to use a programmer to burn the Boot Loader into it first, and then use the serial port to burn the SoftICE into it, and then you can use it.

This post is from DSP and ARM Processors
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list