ARM7 LPC2378 remote upgrade ---- IAP function

Publisher:创意旅程Latest update time:2017-11-29 Source: eefocusKeywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    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:


  1. /****************************************************** *  

  2. Name: Macro definition (Flash operation)  

  3. *************************************************** /  

  4. #define IAP_LOCATION 0x7FFFFFF1 //Define the entry address of the IAP program  

  5. #define IapGetAddr(addr) (volatile uint16 *)(0x80000000|(addr          


Keywords:ARM7 Reference address:ARM7 LPC2378 remote upgrade ---- IAP function

Previous article:ARM7 LPC2378 remote upgrade ---- HEX file
Next article:ARM7 LPC2378 remote upgrade ---- sector

Recommended ReadingLatest update time:2024-11-16 13:33

ARM7 MCU (Learning) - (IV), Timer - 01
Late in the evening~~ Just organize the files~~ Then I'll talk about the rest of the process tomorrow~~ 4. Timer IV - (01) Introduction to timer-related applications and registers~~ Timer 0 and Timer 1 are identical except for the peripheral base address. 2. Application and related description: 3. Pin description
[Microcontroller]
ARM7 MCU (Learning) - (IV), Timer - 01
ARM full analysis of the differences between ARM8/ARM7/A9/A15, etc.
Cortex-A50 is another heavyweight product after Cortex-A15, which will directly affect the market share of mainstream PCs. Around this topic, let's summarize the more mainstream ARM processors for mobile phones in recent years.    From high to low, ARM processors can be roughly ranked as: Cortex-A57 processor,
[Microcontroller]
ARM full analysis of the differences between ARM8/ARM7/A9/A15, etc.
Design and application of power-off protection in embedded systems
In the process of embedded system design, the power-off protection of the system is increasingly valued. The method introduced in this paper is implemented on an embedded platform built with ARM7 series chip S3C4510B and μClinux. The basic idea of ​​the entire power-off protection is to generate power-off signals, c
[Power Management]
Design and application of power-off protection in embedded systems
Introduction to ARM7 Series LPC2103 MCU
1 Introduction LPC2103 is the latest LPC2103 launched by PHILIPS based on ARM7TDMI-S and LQFP48 package, with a maximum operating speed of 70MHz, 32KB on-chip FLASH program memory and 8K on-chip static RAM. ISP/IAP programming is achieved through the on-chip boot loader. The LPC2103's 10-bit A/D converter provides
[Microcontroller]
Introduction to ARM7 Series LPC2103 MCU
Design of bidirectional DC/DC converter based on ARM7 core LPC2119 chip
In order to realize bidirectional transmission of DC energy, bidirectional DC/DC converters are widely used in UPS systems, aerospace power systems, electric vehicle drives, and battery charging and discharging maintenance. In these applications, switching power supplies are often required to not only control the tw
[Microcontroller]
Design of bidirectional DC/DC converter based on ARM7 core LPC2119 chip
Some suggestions for beginners on whether to choose to learn ARM7 or ARM9
1. Talk about the difference between ARM7 and ARM9: This article is written for beginners who are preparing to learn ARM technology but have not decided whether to learn ARM7 or ARM9, or who are not very familiar with the difference between ARM7 and ARM9. The difference between ARM7 and ARM9: 1. Increase of clock
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号