The configuration process of external interrupts in ARM is for reference

Publisher:MusicLover123Latest update time:2016-05-12 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Recently I looked at the configuration of ARM's external interrupts. The specific configuration is as follows:

1) Enable the port clock;

2) Configure the required port as an input port. The specific registers are: port configuration low register (GPIOx_CRL) and port configuration high register (GPIOx_CRH).

For example, GPIOA->CRL&=0XFFFFFFF0; //PA0 is set as input

  GPIOA->CRL|=0X00000008;

Set the default level of the port. The specific register is: Port Output Data Register (GPIOx_ODR) (x=A..E),

For example, GPIOA->ODR|=1<<13;

3) Set the mapping relationship between IO ports and interrupt lines. ARM7 supports 16 input points, and the corresponding configuration registers are: External Interrupt/Event Controller (EXTIX) Register (X: 1~4),

Set the input point to be configured and set the register corresponding to the input point to:

PA[x] pin 
PB[x] pin 
PC[x] pin 
PD[x] pin 
PE[x] pin 

If 13 is set as PA pin, the code can be written like this:

AFIO->EXTICR[EXTADDR]&=~(0x000F< AFIO->EXTICR[EXTADDR]|=GPIOx<

4) Set the trigger conditions for the interrupt;

5) Configure interrupt groups and enable interrupts;

6) Write the interrupt service function.

Keywords:ARM Reference address:The configuration process of external interrupts in ARM is for reference

Previous article:A problem encountered in debugging ARM STM32 external interrupt
Next article:STM32 interrupts and events An example of using GPIO as an external interrupt

Recommended ReadingLatest update time:2024-11-16 19:33

Renesas Electronics to Demonstrate First RA Series MCU Based on Cortex M85 Core
Renesas Electronics announced today that it will demonstrate a microcontroller (MCU) based on the Arm Cortex-M85 core live at Embedded World 2022 in Nuremberg in June. Renesas Electronics launched the RA (Renesas Advanced) series of MCUs based on Arm Cortex-M in October 2019, entering the general Arm-Cort
[Microcontroller]
Analysis of real-time communication characteristics of ARM11 network terminal and implementation of LCD display
The main frequency of ARM11 is 533 MHz, which can reach up to 667 MHz, which is 10 times higher than the main frequency of ARM7. It has richer on-chip resources, faster processing speed and stronger functions. Based on the above characteristics, ARM11 can fully adapt to the design of network terminals with strong real
[Microcontroller]
Analysis of real-time communication characteristics of ARM11 network terminal and implementation of LCD display
Arm Total Design is gaining great success
Compiled from tomshardware When Arm launched its Total Design initiative in October 2023, its success was not guaranteed. However, according to an Arm blog post, Total Design has indeed been a success. Arm's Total Design ecosystem has expanded rapidly, doubling in size in a year. The ecosystem currently
[Semiconductor design/manufacturing]
ARM USB connection communication
USB connection communication 1. Experimental purpose Learn how to use USB related functions, write a program to connect and disconnect USB by pressing the specified keyboard keys. Learn to use the operating system's drawing API function to display a true color bitmap image. 2. Experimental conte
[Microcontroller]
Design of audio processing system based on DSP and ARM
  1 Introduction   With the rapid development of computer technology, electronic technology and communication technology, audio processing technology has also been widely used in many fields, such as mobile phones and IP phones in the communication field, MP3 and CD players in consumer electronics, and speech reco
[Embedded]
Design of audio processing system based on DSP and ARM
How to write the startup code of ARM7 (LPC2119 as an example)
With the improvement of living standards and the advancement of IT technology, the processing power of 8-bit processors can no longer meet the needs of embedded systems; while 16-bit processors have not made a big breakthrough in performance and cost. And in the development of 8-bit computers, assembly language is mos
[Microcontroller]
How to modify the level of Printk in arm Linux
First, printk has 8 loglevels, defined in , where the value ranges from 0 to 7, and the smaller the value, the higher the priority. #define        KERN_EMERG            " 0 "              System crash #define        KERN_ALERT              " 1 " must be handled urgently #define        KERN_CRIT  " 2 "           
[Microcontroller]
A CMOS Image Acquisition System Applied to ARM7
Samsung's S3C4510B is a cost-effective 16/32-bit RISC microcontroller based on Ethernet system. It contains a 16/32-bit ARM7TDMI RISC processor core designed by ARM. ARM7TDMI is a low-power, high-performance 16/32 core. It has a three-stage pipeline structure of 0.9MIPS/MHz, supports 32-bit ARM instruction set and 1
[Microcontroller]
A CMOS Image Acquisition System Applied to ARM7
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号