IAP is the acronym for In Application Programming. It is the process of burning a part of the User Flash area during the operation of the user's own program. The purpose is to conveniently update the firmware program in the product through the reserved communication port after the product is released.
Keywords:IAP
Reference address:What is IAP? How to implement IAP?
Usually when users need to implement the IAP function, that is, the user program updates itself during operation, two project codes need to be written when designing the firmware program. The first project code does not perform normal functional operations, but only receives programs or data through a communication channel (such as USB, USART) to perform updates to the second part of the code; the second project code is the real functional code. Both parts of the project code are burned into the User Flash at the same time. When the chip is powered on, the first project code starts to run first, and it performs the following operations:
1) Check whether the second part of the code needs to be updated
2) If no update is required, go to 4)
3) Perform update operations
4) Jump to the second part of the code execution
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 later, it can be updated through the first part of the IAP code.
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 the interrupt 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 first needs 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-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 as 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.
There is an example of using USART to implement IAP on ST's website. You can refer to this example and the corresponding manual.
Application Note AN2557 - STM32F10xxx in-application programming using the USART
Routine: AN2557 - STM32F10xxx in-application programming using the USART
Previous article:Typedef usage and #define
Next article:Clock Gating
Recommended ReadingLatest update time:2024-11-16 16:03
Solution for remote updating of distribution transformer monitoring terminal program based on IAP function of LPC2378
This paper uses Philips' 32-bit microprocessor LPC2378 to develop a distribution transformer monitoring terminal, and uses the chip's built-in IAP function to achieve remote updating of the terminal program. In order to reduce communication traffic and terminal storage space, this paper also applies the LZW compress
[Microcontroller]
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? Keep reading and you will understand.
What is an ISP:
Use a writer to burn the code in. However, the chip can be on the target board without being taken out. The interface
[Microcontroller]
The concepts and differences of MCU ISP, IAP and ICP programming methods
Anyone who plays with microcontrollers should have heard of the terms ISP, IAP and ICP. But I still don't quite understand the difference between them. Today I will explain them in detail. ISP:In System Programing IAP:In applicating Programing ICP:In Circuit Programing Differences: 1. ISP is to tear down a house and b
[Microcontroller]
How to write the bootloader and app for IAP upgrade of stm8
Because I wrote an IAP upgrade program for stm32 before, I summarized the three main difficulties of IAP upgrade: 1. How to set the interrupt vector, that is, the redirection of the interrupt vector 2. How to configure the starting address of the program 3. How to jump from IAP to APP program 4. Things to note when us
[Microcontroller]
STM8L052R8T6 serial port IAP online upgrade summary (IAR compilation environment)
1. About BootLoader program settings Some areas of FLASH are shown below: As shown in the figure, by default, 0X8000-0X8080 is the interrupt vector table. If we plan to allocate 4KB of space to the BootLoader program, that is, store the BootLoader program from 0X8000-0X9000. Then the corresponding interrupt vector
[Microcontroller]
LPC1100 processor implements IAP function through SD card
With the development of processors, IAP upgrade is becoming more and more popular. There are many ways to upgrade IAP, such as: upgrade via serial port, GPRS remote upgrade, SD card upgrade, etc. Here is a detailed introduction on how to use SD card to upgrade the application.
The following is an introduction to t
[Microcontroller]
- Popular Resources
- Popular amplifiers
- STC MCU Principles and Applications: Analysis and Design from Devices, Assembly, C to Operating Systems: A Three-Dimensional Tutorial (He Bin)
- Detailed explanation of three microcontroller programming methods: ICP, IAP and ISP
- STC8 series MCU development guide: analysis and application of processors, programming and operating systems
- Principles, Applications and Interface Technology of Single-Chip Microcomputers (2nd Edition)
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- BlueNRG-1/2 Flash operations require mutual exclusion with BLE events
- 1S2192 Parameters
- Does anyone have the BAP protocol in Volkswagen's CAN protocol?
- The Definitive Guide to Automotive Ethernet
- Bluetooth learning notes: analysis of example broadcast data
- (Extra 7) GD32L233 Review - FLASH Read and Write
- Live Review: New Opportunities in UWB Market on June 23
- Questions about DDR3 VTT
- Learn to use WiFi module to remotely burn programs to STM32/GD32 MCU in two minutes
- EEWORLD University Hall----Live Replay: Keysight High-Speed Bus PCIe5.0 Technology Development and Test Sharing