MCU three programming methods ICP, IAP, ISP

 

MCU programming methods are mainly divided into three types: ICP, IAP, ISP.

 

ICP (In Circuit Programming) - online circuit programming

 

ISP (In System Programming) - Online System Programming

 

IAP (In applying Programming) - online application programming

 

Commonly used download methods are

 

JTAG programming: programming via the JTAG protocol

 

SWD programming: programming via SWD protocol

 

UART Programming: Programming via UART

 

1. ICP

ICP means "In Circuit Programming". Generally, xx-Link programming tool is required to connect PC and MCU.

Commonly used programming tools are J-Link, ST-Link, and Nu-Link. The matching programming software is J-Flash, st-link utility, NuMicro_ICP_Programming_Tool. Burn through the SWD interface. In this way, LDROM can be rewritten in some cases (that is, BootLoader, boot program or boot area)

For example, the Nuvoton MCU, the software "NuMicro ICP programming tool" running on the PC, updates the internal LDROM, APROM, data flash memory (DataFlash) and target user configuration word (Config) chip through the SWD port.

 

2. ISPs

ISP means "In-System Programming". Generally, the program can be downloaded through the PC serial port (usually a serial conversion module is required, such as PL2303, RS-485, etc.).

For example, Nuvoton MCU, the target chip uses the LDROM boot code of the USB/UART/SPI/I²C/RS-485/CAN peripheral interface to update the internal APROM, data flash memory (DataFlash) and user configuration word (Config) of the chip.

 

This method requires the MCU to have been written to LDROM / BootLoader first. For example, the 8051 single-chip microcomputer has been written in the factory, so it is convenient for novices to download the program through the ISP+serial port. The Nuvoton 51 MCU has not been written in the factory, so it is necessary to buy Nu-Link for the first time, and write to LDROM through ICP.

 

3. IAPs

IAP refers to "in-application programming", which is a method of in-circuit electrical erasing and programming through software. IAP technology structurally maps the Flash memory into two memory banks. When running the user program on one memory bank, the other memory bank can be reprogrammed, and then the program is transferred from one memory bank to the other.

 

 

Summarize:

 

ICP: Use SWD interface for programming, such as J-Link programmer and J-Flash software.

 

ISP: Use the bootloader (Bootload) plus peripheral UART/USB and other interfaces to burn.

 

IAP: A method in which the software itself implements in-circuit electrical erasure and programming without using any tools. The program is usually divided into two parts, namely the boot program and the application program.