For In Application Programming (IAP), the IAP procedure should be called by pointing the word pointer in register r0 to the memory (RAM) containing the command code and parameters. The result of the IAP command is returned to the result table pointed to by register r1. The user can reuse the command table to obtain the result by passing the same pointer in registers r0 and r1. The parameter table should be large enough to store all the results in case the number of results is greater than the number of parameters. The parameter passing process is shown in the figure below.
The number of parameters and results varies according to the IAP command. The maximum number of parameters is 5, which are passed to the "Copy RAM to Flash" command. The maximum number of results is 2, which are returned by the "Sector Check Empty" command. The command handler sends the status code INVALID_COMMAND when it receives an undefined command. The IAP routine is thumb code and is located at address 0x7FFF FFF0.
The IAP function can be called using the following C code. Define the entry address of the IAP program. Since the 0th bit of the IAP address is 1, when the program counter is transferred to this address, it will cause a change in the Thumb instruction set. The IAP function code is attached below:
/****************************************************** *
Name: Macro definition (Flash operation)
*************************************************** /
#define IAP_LOCATION 0x7FFFFFF1 //Define the entry address of the IAP program
#define IapGetAddr(addr) (volatile uint16 *)(0x80000000|(addr
Previous article:ARM7 LPC2378 remote upgrade ---- HEX file
Next article:ARM7 LPC2378 remote upgrade ---- sector
Recommended ReadingLatest update time:2024-11-16 13:33
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- An ARM7-based automotive gateway solution
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- How to view the status of GPIO ports during CCS5.5 debugging
- About WiFi module
- MSP430F5438A upgrade failed
- Simple RISC processor design
- CC2541 (Master UART) - CC2541 (Slave UART) Serial Port Transparent Transmission Experiment
- This is the seminar material.
- PWM output of MSP430 library timer TA
- [RVB2601-demo analysis] CH2601_UART
- Selection of MLCC in Bypass-Decoupling Applications
- Easter egg at the end of the event: Tektronix answers 9 questions from netizens in the USB theme event