1 Ways to detect event occurrence: polling and interruption
2 S3C2440 abnormal interrupt system block diagram
An interrupt is a type of exception.
Switching between different modes of ARM processor:
a. In the privileged level (non-user mode) operating mode, the operating mode can be switched by modifying the mode control bit of the program status register CPSR.
b. Switch the operation mode through the exception handling process.
Note that in user mode, the processor mode cannot be switched directly. It is necessary to generate exception handling and switch the processor operating mode during the exception handling process.
3 ARM Registers
Unbacked registers: shared between modes.
Backup register: exclusive to a certain mode.
Understanding the value of the program counter PC:
PC points to the instruction address at the read level, not the instruction address at the execution level. Depending on the depth of the pipeline, the offset of PC relative to the current instruction address is also different. The following takes the ARM architecture and 3-stage pipeline as an example:
The space occupied by ARM instructions is 4 bytes, so when executing the MOV instruction,
PC value = current execution level instruction address + 8
4 Exception Vector Table
Each time the CPU executes an instruction, it will detect whether an exception interrupt occurs. When an exception occurs during program execution, the program will jump to the corresponding exception vector address and perform exception handling operations. The exception vector address is related to the chip design, and this jump process is enforced by the CPU; however, exception handling is implemented by the user through code. A jump instruction can be placed at the address defined by the vector table to implement user-defined exception handling functions.
5 Abnormal interrupt response process
6 Abnormal interruption processing flow
7 Description of related registers of S3C2440 interrupt controller
8 printfException
9 und exception handling sample code
10 swi exception handling sample code
11 irq exception handling sample code
Previous article:System clock configuration
Next article:NAND Flash Driver
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Hardware Design: Circuit Design of DSP TMS320C5509A
- VaST's latest modeling tool enables comprehensive software development before tapeout
- Pan it STM32H750 3 (lan8720 Ethernet test --iperf)
- Understanding of MSP430 interrupt mechanism
- Understand some misunderstandings about FPGA learning
- Transmit power measurement method
- My Journey of MCU Development (VI)
- [RVB2601 Creative Application Development] 4 Long press and short press to eliminate the letter A
- CC2520 BasicRF Study Notes
- Improve your basic knowledge of embedded systems