1: During normal execution, the value of the program counter register PC increases by four bytes for each ARM instruction executed, and the value of the program counter register PC increases by two bytes for each Thumb instruction executed. The entire process is executed sequentially.
2: Through the jump instruction, the program can jump to the specified address label for execution, or jump to a specific subroutine for execution. The B instruction is used to perform the jump operation, and the BL instruction is used to save the corresponding return address of the subroutine while performing the jump operation. BX separates the lowest bit of the target address while performing the jump operation, and can switch the program to THumb state. BLX performs the above three operations
3: When an abnormal interrupt occurs, the system will execute the current instruction and then jump to the corresponding abnormal interrupt handler for execution. After the abnormal interrupt handler is executed, the program returns to the next instruction where the interrupt occurred to continue execution. When entering the abnormal interrupt handler, the execution scene of the interrupted program must be saved. When exiting from the abnormal interrupt program, the execution scene of the interrupted program must be restored.
ARM processor's response to abnormal interrupt
1 Save the current state of the processor, the interrupt mask bit, and each condition flag bit. This is achieved by saving the contents of the current program status register CPSR to the SPSR register corresponding to the exception interrupt to be confident.
2 Set the corresponding bits of the current program status register, including the bits in the CPSR, so that the processor enters the corresponding execution mode, sets the bits in the CPSR, and the IRQ interrupt is executed, but when entering the FIQ, the FIQ interrupt is executed.
3 Set the register to the return address
4 Set the program counter PC to the interrupt vector address of the long exception interrupt, so as to jump to the corresponding exception interrupt for processing
Return from exception handling
1 Restore the processor status of the interrupted program and transfer the contents of the SPSR_mode register to the CPSR
2 Return to the next instruction of the instruction where the abnormal interrupt occurred, and write the content in IR_MODE to PC
3 Reset and exception interrupt do not need to return, the different exception interrupts pointed to by the program counter PC are different
Previous article:ARM processor power-on/reset operation
Next article:Exception handling process of ARM1176JZF-S/S3C6410 processor
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Download to get gifts | TE outdoor monitoring, an important guarantee and trend choice for creating a safe and stable society!
- How to process the signal of BLDC feedback speed measuring motor
- Seeking agent chip GD32F405
- "Play Board" + STM32F407 core board voice-controlled colored lights
- There may be a cure for the bald self! Tencent AI analyzes the cause of male baldness for the first time
- [TI recommended course] #Boost and buck-boost DCDC converters help wireless charging design#
- Arduino online simulation website wokwi
- EMC Design in RFID Applications
- [NXP Rapid IoT Review] Classic Snake purely hand-typed
- TMS320VC5509A DSP Learning Route