当前位置:网站首页>Programming features of ISP, IAP, ICP, JTAG and SWD
Programming features of ISP, IAP, ICP, JTAG and SWD
2022-07-07 10:11:00 【m0_ fifty-nine million nine hundred and forty-nine thousand fou】
Electronic engineers all know , Semiconductor technology is developing rapidly , It has driven the continuous upgrading of various chip technologies . In terms of data storage , From the original mask ROM, To the present Flash technology , Continuous improvement of storage technology , The corresponding programming technology is also developing .
I remember the older generation of engineers writing 51 When the single-chip microcomputer is used, it still uses a huge programmer to download the program , And it's disposable (OTP), Every time I carefully debug the code and then download it to see the effect . Now it is as simple as a serial port downloader to realize program download , There is basically no need to consider the problem of programming times , Compile and download updates whenever you have an idea .
In the course of this development , Many programming techniques have also been born , such as ISP、IAP、ICP, And then there is JTAG Programming 、SWD Programming 、UART Programming and so on . Those who play SCM should be familiar with these words , But what's the difference between them ? First, let's look at their definitions :
ISP:In System Programing, In system programming
ICP:In Circuit Programing, In circuit programming
IAP:In Application Programing, In application programming
JTAG Programming : adopt JTAG Protocol programming
SWD Programming : adopt SWD Protocol programming
UART Programming : adopt UART Programming
It looks like a mess , In fact, if the hierarchical relationship between them is clear, it will not be messy . Use a picture to visualize :
See from the graph ,ISP and ICP It's the technology at the top . It describes a programming structure , The protocol used 、 Communication port, etc , Different chips have different definitions .
IAP In the second floor , Is a way of programming . The implementation method is to download a piece of executable code of the target chip to the chip through some communication protocol RAM And executed by the chip , The specific operation is realized by this code to achieve the purpose of programming . This method requires the chip to support the chip through a certain communication protocol RAM Read and write and be able to control its CPU. This is a programming method under the programming structure , image AK100Pro、SmartPRO 5000U-Plus Wait for the burner , All use this programming method .
At the bottom is the hardware communication protocol ,UART It is the first serial communication technology used in single chip microcomputer .JTAG and SWD yes ARM After the rise of kernel chips , Gradually popular , These three technologies describe the communication protocol used by the hardware layer in the programming process , Are some of the lowest technical specifications .
Use a table to compare the characteristics of these communication protocols :
Synthesize the above contents , as long as UART、JTAG、SWD These hardware communication protocols can ensure the standardization and stability of electrical connection , that ISP、IAP You can program the chip correctly .
Further analysis ISP and IAP Two concepts :
ISP:in system programming, The writer will code Burn in , however , The chip can be on the target board , No need to take it out , When designing the target board, the interface is designed on it , So called " In system programming ", I don't have to leave the system ;
IAP: in applicatin programming In application programming , There's the chip itself ( Or through peripheral chips ) You can use a series of operations to code write in , Like a support Iap The single chip computer of , Internal division 3 A program area ,1 It's the bootstrap area ,2 Run program area ,3 It's a download area , The chip receives the download command through the serial port , Enter the boot area and run the boot program , Under the bootloader, you will new code Download the content to the download area , After downloading and checking, copy the contents of the download area to 2 District , Run the reset program , be Iap complete ;
What is? ISP:
Use a writer to write code Burn in , however , The chip can be on the target board , No need to take it out , When designing the target board Interface design on top , So called " In system programming ", I don't have to leave the system ;
What is? IAP:
In application programming , There's the chip itself ( Or through peripheral chips ) You can use a series of operations to code write in , Like a support Iap Of Single chip microcomputer , Internal division 3 A program area ,1 It's the bootstrap area ,2 Run program area ,3 It's a download area , The chip receives the download command through the serial port , Enter the boot area and run the boot program , Under the bootloader, you will new code Download the content to the download area , After downloading and checking, copy the contents of the download area to 2 District , Run the reset program , be Iap complete ;
applications :
1,ISP Program upgrade needs to be solved on site , But it's better not to dismantle the machine ;
2,IAP If there is a network management system , Download everything with the NMS , People don't have to run around ,
This may be their advantage or application
There are two ways to implement online programming : In system programming (ISP) And in application programming (IAP).ISP In general, it is through the special serial programming interface of the single-chip microcomputer to control the internal control of the single-chip microcomputer Flash Memory programming , and IAP Technology is structurally Flash Memory is mapped into two banks , When running a user program on a bank , You can reprogram another memory , And then move control from one storage to another .ISP In general, the implementation of this method needs few external circuits , and IAP The implementation of is more flexible , Usually, the serial port of single chip microcomputer can be used to connect to the computer RS232 mouth , The internal memory is programmed by a specially designed firmware program . ISP and IAP Very similar , There is no need to pull the chip out of the board , That's it PC-MCU Programming interface (JTAG、 A serial port 、 Twisted pair 、SPI etc. ) Fix the purpose of upgrading the new version .MCU Internally, an independent section is executed first Boot Code ( This paragraph Boot Codes are generally factory preset , Or burning with a programmer , Usually only 1k or 4k,SST It usually takes up a separate piece of Block,Philips Usually let BootROM Address and other Flash overlap , To achieve the hidden effect ),Boot Responsible for controlling erasure Program memory And code for programming program memory ( Or execution code provided outside the processor ), Then through some kind of communication with PC The way computers communicate ( Such as ,ether so ), Put a user specified in PC Compiled on MCU A runnable binary code file is programmed into MCU Program memory in .
ISP and IAP The biggest difference is : Who triggers .
ISP Yes 4 Trigger mode :
1. By external hardware circuit : Such as VDD Keep it high , to RST continuity 3 Pulse ;
2. Detection status bit : Such as ISPEN, by 0 when PC Pointer from 0000H Start execution ; by 1 when , adopt “ Guidance vector ” To calculate the “ISP Code ” The location of . This status bit will be detected after each reset ;
3. The abort controller signal triggers the chip to reset : The stop control symbol signal refers to a long signal on the receiving pin of the asynchronous serial port Low level up to one frame length , Here, the length of one frame is related to the working mode of asynchronous serial port .
4. Call directly ISP: User programs can also call , But it's dangerous .
4 The purpose of the two methods is the same —— Get into ISP Subroutines , such as Philips Ex factory ISP The subroutine is in 1E00H-1FFFH, As long as you can guide PC Pointer to 1E00H That's all right. .
And enter ISP The purpose of the code is : Get into BootROM.
IAP The trigger of is simpler , No external triggers . Through some indicator bits (SST by SC0/SC1、SFCF[1,0];Philips For a paragraph IAP Subroutines , Save in FF00H~FFFFH In the address space ), Reach and guide to BootROM Purpose .
All roads lead to Rome ,ISP、IAP Enter BootROM What resides inside Boot Code , That's the ultimate goal .
The last one : Parallel programming mode . Unwanted BootROM, Directly set multiple pins of the chip to make the chip recognize commands ( Such as : erase 、 write in 、 Validation etc. ), from P Oral address 、 data , You can write Flash
use LPC2000 Of IAP, Assign it yourself FLASH Space , To specify a BLOCK Used to store your data , And then through IAP Write operation . After every boot up , From this BLOCK Read your data
边栏推荐
- 单片机(MCU)最强科普(万字总结,值得收藏)
- Use of JSON extractor originals in JMeter
- Qualifying 3
- EXT2 file system
- [learning notes - Li Hongyi] Gan (generation of confrontation network) full series (I)
- Parameter sniffing (1/2)
- Using keras in tensorflow to build convolutional neural network
- Methods of adding centerlines and centerlines in SolidWorks drawings
- ES6中的函數進階學習
- Fiddler break point
猜你喜欢
XML配置文件解析与建模
ORM -- query type, association query
Official media attention! The list of top 100 domestic digital collection platforms was released, and the industry accelerated the healthy development of compliance
LeetCode 练习——113. 路径总和 II
视频化全链路智能上云?一文详解什么是阿里云视频云「智能媒体生产」
Web3.0 series distributed storage IPFs
fiddler-AutoResponder
Internship log - day07
ORM--查询类型,关联查询
一大波开源小抄来袭
随机推荐
Three years after graduation
Official media attention! The list of top 100 domestic digital collection platforms was released, and the industry accelerated the healthy development of compliance
Writing file types generated by C language
ORM模型--数据记录的创建操作,查询操作
Before joining the chain home, I made a competitive product analysis for myself
MCU与MPU的区别
Parameter sniffing (1/2)
STM32产品介绍
Postman interface test VII
web3.0系列之分布式存储IPFS
Gym - 102219j kitchen plates (violent or topological sequence)
Pit encountered by vs2015 under win7 (successful)
企业实战|复杂业务关系下的银行业运维指标体系建设
Postman interface test IV
ORM -- logical relation and & or; Sort operation, update record operation, delete record operation
Introduction to uboot
ES6中的原型对象
Applet popup half angle mask layer
Google colab loads Google drive (Google drive is used in Google colab)
The method of word automatically generating directory