There are usually three ways
1. Query method
2. Interrupt mode
3. DMA mode (in an independently developed space that is not controlled by the CPU, DMA manages it by itself. It realizes high-speed data transmission between memory and peripherals)
Mainly talk about interruption:
Interrupt request ----> interrupt arbitration ----> interrupt response ----> interrupt processing ----> interrupt return (to save the scene)
Interrupt handling process:
1. The interrupt controller captures the interrupt signal sent by the current peripheral and notifies the SOC (central processing chip: system on chip)
2. SOC saves the current program's operating environment and calls the interrupt service routine (ISR: a small piece of code) to handle the interrupt
3. In the ISR, read the interrupt control register and the related registers of the peripheral to identify the interrupt trigger, obtain the hardware interrupt number IRQ, and jump to the corresponding handler (detailed and complete handler) to complete the interrupt processing.
4. Clear interrupt: by reading and writing related registers
5. Restore the interrupted environment and continue execution (on-site)
2440 has 60 interrupt sources
The concepts of primary interrupt source, secondary interrupt source, etc.
The units indicated in the picture are the corresponding registers
The pending register source pending (SUBSRCPND, SRCPND) is cleared by writing 1 to the corresponding bit. This is different from the normal clearing method. INTPND is also cleared by writing 1.
INTOFFSET: This register is used to indicate which bit in the INTPND register is set to 1. That is, when the bit in the INTPND register is 1, the value of the INTOFFSET register is x (x is 0~31)
When the SRCPND and INTPND registers are cleared, the INTOFFSET register is automatically cleared.
For details, please refer to the chip manual S3C2440
External Interrupt:
External interrupts also have related registers: EXTINTx, EINTMASK, and EINTPEND
EXTINTx sets the interrupt trigger mode: low level, high level, rising edge, falling edge, edge trigger
EINTMASK
EINTPEND interrupt pending register (corresponding interrupt trigger, corresponding position 1) Reading this register can tell which register is triggered
Previous article:ARM9 startup analysis memory distinction and startup process analysis
Next article:ARM bare metal programming - key interrupt programming
- 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
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Can someone help me take a look at this, C++ [] overloading error
- SAMA5 Linux-3.18 RTL8188EU Development Guide
- [GD32E231 DIY Contest] Part 1: Serial Shell Debugging
- [ESP32-Korvo Review] (7) Echo Cancellation Algorithm Test
- How to design high voltage power supply test tooling?
- Negative ion generator export certification
- What do the common codes in RFID mean?
- Help
- 【RT-Thread Reading Notes】——The harder you work, the luckier you will be
- Question sharing: What is the difference between AFE and battery monitor in battery management chip?