S3C2440 has a total of 60 interrupt sources, of which 15 are sub-interrupt sources, which correspond to each bit in the SUBSRCPND register, and the other 45 interrupt sources correspond to each bit in SRCPND. It should be noted that EINT4~7 correspond to the same bit SRCPND[4], and EINT8~23 also correspond to SRCPND[5].
1 S3C2440 interrupt register
1.1 External Interrupt Register
Registers:
1.2 Internal Interrupt Register
Register:
SUBSRCPND: When an interrupt occurs, the corresponding bit will be set to 1, indicating that an interrupt has occurred.
INTSUBMSK: Same as the previous one, interrupt mask register.
SRCPND: When an interrupt occurs, the corresponding bit will be set to 1, indicating that one or a class of interrupts has occurred.
INTMSK: Used to mask the interrupt identified by the SRCPND register. But only IRQ interrupts can be masked, not FIQ interrupts.
INTMOD: When a bit in INTMOD is set to 1, the corresponding interrupt is set to FIQ, and the CPU will enter the fast interrupt mode.
PRIORITY: Used to set the priority of the IRQ interrupt. For specific usage, please refer to the chip manual.
INTPND: After the interrupt priority arbiter selects the interrupt with the highest priority, the corresponding bit of this interrupt in the INTPND register is set to 1, and then the CPU enters the interrupt mode to handle it. At the same time, only one bit of this register is set to 1.
INTOFFSET: Used to indicate which bit in the INTPND register is set to 1, that is, to record the value of bit x in INTPND where bit [x] is 1. Automatically cleared when INTPND and SRCPND are cleared.
1.3 Relationship between registers:
Figure 1 Relationship between interrupt registers
2 Interruption process
2.1 Internal interrupt process
a If it is an internal interrupt without sub-interrupt: after it occurs, the corresponding position of SRCPND is set to 1. If it is not masked by INTMSK, it waits for further processing.b If it is an internal interrupt with sub-interrupt: after it occurs, the corresponding position of SUBSRCPND is set to 1. If it is not masked by INTSUBMSK, the corresponding position of SRCPND is set to 1, waiting for further processing. Several SUBSRCPNDs may correspond to the same SRCPND. The corresponding table is as follows:
2.2 External interrupt process
a If it is an external interrupt: After EINT0-EINT3 occurs, the corresponding position of SRCPND is set to 1. If it is not masked by INTMSK, it waits for further processing. After EINT4-EINT23 occurs, the corresponding position of EINTPEND is set to 1. If it is not masked by EINTMASK, the corresponding bit EINT4-7 or EINT8-23 of SRCPND is set to 1. If it is not masked by INTMSK, it waits for further processing. Several EINTPENDs correspond to the same SRCPND. The corresponding table is as follows:2.3 Enabling interrupts
a. If it is an internal interrupt without sub-interrupt, just set INTMSK to make it unmask the interrupt.b. If it is an internal interrupt with sub-interrupt, set INTSUBMSK and INTMSK to make them unmask the interrupt.
c. If it is an external interrupt, for EINT8-23, you need to set EINTMASK and INTMSK. For EINT0-EINT3, you only need to set INTMSK.
2.4 Clearing Interrupts
a. If it is an internal interrupt without sub-interrupt, just clear SRCPND. Note that the clearing position needs to be 1.b. If it is an internal interrupt with sub-interrupt, clear SRCPND and SUBSRCPND. Note that SUBSRCPND should be cleared first, then SRCPND. Because if you clear SRCPND first, then in the process of clearing SUBSRCPND, SRCPND will think that another interrupt has occurred and will be set to 1 again. In other words, an interrupt will be responded to twice. So the source must be cut off first.
c. If it is an external interrupt, for EINT8-23, you need to clear EINTPEND and SRCPND (also pay attention to the order). For EINT0-EINT3, you only need to clear SRCPND.
Previous article:S3C2440 clock system
Next article:ARM link address and programming address
Recommended ReadingLatest update time:2024-11-16 17:36
Construction of embedded Linux root file system based on S3C2440
Embedded Linux has long been a household name in the IT industry. Using Linux for embedded product development has a great advantage, which is that the development resources are abundant and the cost is low. The embedded Linux operating system is gaining more and more attention and its application is becoming more and
[Microcontroller]
s3c2440 bare metal - abnormal interrupt 3 - swi soft interrupt
swi (soft interrupt)
We know that arm has 7 working modes, except for the usr mode, the other 6 are privileged modes. We know that the usr mode cannot modify CPSR to directly enter other privileged modes, but Linux applications generally run in the usr mode. Since the usr mode has very low permissions and canno
[Microcontroller]
S3C2440 RTC bare metal program
The RTC (Real Time Clock) unit can work with a backup battery when the system power is turned off. The RTC can send 8-bit binary-decimal (BCD) value data to the CPU using the STRB/LDRB ARM operation. This data includes time information such as year, month, day, week, hour, minute and second.
The RTC unit works with an
[Microcontroller]
S3C2440 Memory SDRAM Control Notes
In the past year or so, I have been engaged in the research and practice of arbitrary gear robot motion control and inertial navigation. The development board I bought has been idle for more than a year, and I decided to continue what I learned more than a year ago and continue taking notes. SDRAM read and write ope
[Microcontroller]
How to use JLink to indirectly burn Nor and Nand Flash of S3C2410 and S3C2440 development boards
1. Brief description JLink's debugging and Flash burning functions are very powerful, but the Flash operations of S3C2410 and S3C2440 are a bit troublesome: SDRAM needs to be set when burning Nor Flash, otherwise the speed is very slow; burning Nand Flash is only theoretically possible, but no one has directly impleme
[Microcontroller]
Let's learn mini2440 bare metal development (Part 4) -- S3C2440 timer learning
Overview of S3C2440 Timer Principle The s3c2440 has five 16-bit timers, timers 0, 1, 2, and 3 have pulse width modulation (PWM) functions, so these four timers are also called PWM timers. Timer 4 is an internal timer with no external output pins. The clock source of the timer is PCLK. The frequency required for t
[Microcontroller]
Writing the S3C2440 block device driver to simulate a hard disk using memory (Twenty-one)
Refer to the kernel's built-in block device driver: drivers/block/xd.c drivers/block/z2ram.c 1. The structures required in this section are as follows: 1.1 gendisk disk structure: struct gendisk { int major; //Device major number, equal to major in register_blkdev() function int first_minor; //The starting
[Microcontroller]
s3c2440 bare metal-memory controller (3-2, adaptive access timing of norflash programming)
Earlier we learned about the characteristics and principles of norFlash , so how does the CPU communicate with norFlash? Let’s start with the detailed introduction. 1. Memory controller adapted to norflash The figure shows the programmable access cycle read and write timing of the S3C2440 memory controller. The time p
[Microcontroller]
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- 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
Guess you like
- Keys? No more! The future of car access systems is here
- [ESP32-Korvo Review] 05 Development Environment Construction Part 2
- SIMETRIX/SIMPLIS simulation tutorials and examples
- Development data of National Technology N32G455
- What is IoT
- [SC8905 EVM Review] + Found an error in the User Guide
- What communication technology is needed for the interactive transmission of RFID information?
- [Ready to use] LIS2DTW12 functional demonstration project (STM32G474)
- Code migration process of MSPBoot
- Why is there a 2 in the denominator when calculating the baud rate of the serial port communication of the 51 single-chip microcomputer? I have always wondered why it is divided by 2