The interrupt process is as follows:
The interrupt source detects the interrupt signal and then sends it to the interrupt controller. The interrupt controller determines whether the interrupt is masked and decides whether to send the interrupt signal to the CPU. After the interrupt signal is sent to the CPU, the CPU processes the interrupt, that is, calls the interrupt function.
The above process is basically the interrupt processing process of the embedded system, but different embedded systems have different configurations in these three parts.
S3C6410 has a total of 64 interrupt sources.
The above picture shows the interrupt controller of S3C6410. Here we are concerned about the red box part. These two are interrupt controllers, each managing its own 32 interrupts.
Here, a part of the picture is captured. There are 64 interrupts in total, each interrupt has its own label, its own group, and which interrupt controller controls it. The label refers to which bit or register of the corresponding interrupt controller register corresponds to it. For example, INT_EINT0, this is external interrupt 0, belongs to VIC0, and the label is 0. This means that the 0th bit or the 0th register of the VIC0 register corresponds to the external interrupt 0 interrupt.
This chapter is about external interrupts. S3C6410 has 127 external interrupts, and its I0 pins and groups are as follows:
S3C6410 divides external interrupts into 10 groups. Each group has corresponding pins. For external interrupt group 0, 16 pins GPN0-GPN15 can be used.
In addition to the groups, interrupt numbers are assigned to the groups:
The 27 interrupts belonging to external interrupt group 0 occupy 4 interrupt numbers in VIC, namely external interrupts 0-3, external interrupts 4-11, external interrupts 12-19, and external interrupts 20-27. External interrupt groups 1-9 only occupy 1 interrupt number.
In order to save interrupts, it is impossible to assign an interrupt number to each external pin, so some external interrupts are combined into one interrupt number. For example, external interrupts 0-3 are combined into one interrupt number, INT_EINT0. When any of these four interrupts generates an interrupt, INT_EINT0 will be suspended, and the CPU will know that external interrupts 0-3 have been generated, and then execute interrupt processing. In the interrupt service program, in order to know which interrupt is generated, it is also necessary to query the register to know which interrupt is generated.
S3C6410 interrupt processing has vector mode and non-vector mode. Because it is compatible with the previous ARM series, the non-vector mode is preserved. The non-vector mode means that when an interrupt occurs, it jumps to the interrupt exception, and then writes a program in the interrupt exception to determine which interrupt occurred, and then executes the corresponding interrupt handler. However, in the non-vector mode, the entry address corresponding to each interrupt is set in advance, so that when an interrupt occurs, it does not need to jump to the interrupt exception, but directly jumps to the corresponding interrupt program. In this way, the efficiency of interrupt processing is improved.
In my design, the interrupt vector method is used. It is recommended to use the interrupt vector method.
Previous article:Design of automotive "black box" based on ARM
Next article:ARM microcontroller core structure
- 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
- 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
- Introduction to the application of decoupling capacitors in single chip microcomputer circuits
- CC2640之ADC功能实现和供电电压的採集
- 18 CC3200-LAUNCHXL development board user evaluation reports are out, participate in the vote to win prizes!
- [Synopsys IP Resources] Fast, accurate, and ruthless, Verdi automatically solves debugging problems and unleashes chip productivity
- A Brief Discussion on Synchronization of Multiple Asynchronous Clock Design
- SG3824 is a push-pull switching power supply without dual PWM output. Can you help me?
- [Sipeed LicheeRV 86 Panel Review] VII. Compiling d1-h_nezha-...
- Optimal control of solar panel position based on GD32E231
- STM32F103C8T6 low power consumption problem
- Counting TI's star products in T-BOX: Automotive Ethernet | Section 1 DP83TC811S-Q1: Automotive Ethernet makes your T-BOX...