Students who play with microcontrollers should have heard of the terms IAP, ICP, and ISP. Here, I will help you “consolidate” your knowledge. First, let’s introduce these terms.
● ICP (In Circuit Programming)
● ISP (In System Programming)
● IAP (In Application Programming)
1. ICP (In Circuit Programming)
Those who have used the Nuvoton microcontroller must know that the Nuvoton microcontroller comes with a set of programming tools, namely NuMicro_ICP_Programming_Tool, similar to the J-Flash tool configured for ST chips.
Using the corresponding manufacturer’s software and emulator, programs can currently be programmed using mainstream interfaces such as JTAG (Joint Test Action Group) and SWD (Serial Wire Debug). ICP programming is conducted via the SWD interface.
The image below shows the difference between the JTAG and SWD interfaces:
To execute the ICP function, only three pins are needed: RESET, ICPDA, and ICPCK. RESET is used to enter or exit ICP mode, ICPDA is the data input/output pin, and ICPCK is the programming clock input pin. Users need to reserve VDD, GND, and these three pins on the system board.
Nuvoton officially provided a detailed description: ICP refers to “In Circuit Programming,” where the software “NuMicro ICP Programming Tool” running on the PC updates the chip’s internal APROM, LDROM, DataFlash, and target user configuration word (Config).
2. ISP (In System Programming)
ISP refers to “In System Programming,” where the target chip uses USB/UART/SPI/I²C/RS-485/CAN peripheral interfaces to update the chip’s internal APROM, DataFlash, and user configuration word (Config) using the LDROM boot code.
3. IAP (In Application Programming)
IAP is a method to achieve online erasure and programming through software.IAP technology structurally maps the Flash memory into two storage bodies; when running a user program on one storage body, the other storage body can be reprogrammed, and then the program is switched from one storage body to the other.
Below, we will detail these three programming methods with the programming tools used during the programming process and specific cases:
(1) ICP uses the SWD interface for programming. Common programming tools include J-Link, ST-Link, and Nu-Link; the corresponding programming software includes J-Flash, NuMicro_ICP_Programming_Tool, and ST-Link Utility.
(2) ISP is programmed using a boot program via USB/UART, etc. First, a BootLoad program is required. The most common programming method is using the STC-ISP programming tool when learning about the 8051 microcontroller.
(3) IAP is a method to achieve online erasure and programming through software without using any tools, simply updating data in Flash through software.
Let me tell you a case where a 4G module is used to remotely update the program. The Flash is divided into two regions: the first is the Bootload program, and the second region stores the application program (APP). The 4G module communicates with the target board, including whether to update. If the main board receives the update signal, it writes a flag into Flash, such as ‘P’. Then the program jumps to the first Bootload program to execute, first checking if there is an update flag ‘P’ in Flash. If so, it updates the application program according to the specified protocol. Once completed, it clears the update flag in Flash and jumps to execute the application program. If there is no update flag ‘P’, it jumps directly to execute the application program.
ICP: Uses the SWD interface for programming, such as the J-Link programmer and J-Flash software.
ISP: Uses a boot program (Bootload) plus peripheral interfaces like UART/USB for programming.
IAP: The software itself achieves online erasure and programming without using any tools. The program is usually divided into two parts: the boot program and the application program.
Finally, I have a question for everyone: when using IAP programming, can the boot program and application program be combined into a single code area application program, and can software updates still be implemented? How would that work? Think about it; the answer is yes.
Copyright belongs to the original author. If there is any infringement, please contact for deletion.
The Japanese Operating System That Almost Dominated the World…
Lei Jun’s 1992 Computer Paper Exposed: Ideas Too Ahead of Their Time!
VSCode vs. SourceInsight, Which is Better for Viewing Source Code?
→ Follow for more updates ←