Learn ARM development(18)

Publisher:清新天空Latest update time:2024-11-14 Source: cnblogs Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Last time, we have learned about the interrupt handling process of ARM and how to set the interrupt function. So, does it work like this? The answer is no. Because S3C44B0 has several registers that control whether the interrupt is turned on. These registers are as follows:

1. Program Status Register (CPSR).

This register has two bits that control whether to respond to FIQ or IRQ interrupts. If both bits are set to 1, no interrupts will be responded to. These two bits will be used to disable interrupts later. In RTOS, these two bits are needed to disable interrupts as critical sections.

2. Interrupt Control Register (INTCON)

This register only uses the lower 3 bits: 0, 1, and 2.
When bit 0 is set to 1, FIQ interrupts are not used; when it is set to 0, FIQ interrupts are used.
When bit 1 is set to 1, IRQ interrupts are not used; when it is set to 0, IRQ interrupts are used.
When bit 2 is set to 1, non-vectored IRQ interrupts are used; when it is set to 0, vectored IRQ interrupts are used.

3. Interrupt mode register (INTMOD)

This register sets the interrupt mode used by 26 interrupt sources. When the corresponding bit is set to 0, it means using the IRQ interrupt mode, and when the corresponding bit is set to 1, it means using the FIQ interrupt mode.

4. Interrupt mask register (INTMSK)

This register is used to specify who can respond to interrupts. Bit 26 is special, it is the global interrupt mask bit. If it is set to 1, all interrupts will not be responded to. Bits 0 to 25 are the mask bits of 26 interrupt sources. If set to 1, it means not responding to interrupts, and if set to 0, it means responding to interrupts.

5. Clear the interrupt bit register (I_ISPC)

If you want to interrupt again after an interrupt occurs, you need to clear the corresponding interrupt bit. In this case, use the I_ISPC interrupt register.
When the corresponding bit of this register is set to 1, the corresponding interrupt bit is cleared, and when the next interrupt comes, you can respond again.

By setting the above interrupt registers, you can make the interrupt of S3C44B0 work. Interrupts are very important and must be used skillfully. No matter what kind of CPU, it uses such things. Interrupts are the mechanism for modern high-speed CPUs to communicate with low-speed devices. Without this mechanism, high-speed CPUs cannot work efficiently at all.


Reference address:Learn ARM development(18)

Previous article:Embedded system debugging simulation tool
Next article:Learn ARM development(17)

Recommended ReadingLatest update time:2024-11-15 01:45

C51 interrupt application interrupt and using
The basic structure of the 8051 series MCU includes: 32 I/O ports (4 groups of 8-bit ports); two 16-bit timer counters; full-duplex serial communication; 5 interrupt sources (2 external interrupts, 2 timer/counter interrupts, 1 serial port input/output interrupt), two-level interrupt priority; 128 bytes of built-in RA
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号