ARM bare metal development 222440 interrupt principle

Publisher:MagicGardenLatest update time:2016-06-06 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1Data transmission control method between CPU and peripherals (I/O control method)

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.

ARM bare metal development 222440 interrupt principle
 

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

 

ARM bare metal development 222440 interrupt principle
 

EINTMASK

ARM bare metal development 222440 interrupt principle
 

EINTPEND interrupt pending register (corresponding interrupt trigger, corresponding position 1) Reading this register can tell which register is triggered

ARM bare metal development 222440 interrupt principle
 

 

 

 

Keywords:ARM Reference address:ARM bare metal development 222440 interrupt principle

Previous article:ARM9 startup analysis memory distinction and startup process analysis
Next article:ARM bare metal programming - key interrupt programming

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号