The vector interrupts of Cortex-M3 are uniformly managed by NVIC.
EXTI is the external interrupt control extended by ST on its STM32 products. It is responsible for managing the external interrupts mapped to the GPIO pins and the interrupts of several integrated peripherals on the chip (PVD, RTC alarm, USB wakeup, ethernet wakeup), as well as software interrupts. Its output is eventually mapped to the corresponding channel of NVIC. Therefore, the process of configuring EXTI interrupts must include the configuration of NVIC. For example, the process of configuring EXTI0 below first configures the EXTI controller (enables the corresponding interrupt line, selects the interrupt/event mode, and triggers the edge polarity), and then configures the NVIC controller (the channel number of EXTI0 mapped on NVIC, interrupt priority, and interrupt masking status):
GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource0);
EXTI_InitStructure.EXTI_Line = EXTI_Line0;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPrio
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
The value of EXTI0_IRQn is actually the position of the EXTI0 interrupt vector in the interrupt vector table (the value in the Position column of the interrupt vector table in the STM32 Technical Reference Manual)
Previous article:STM32 clock tree notes
Next article:S3C2410 NorFlash expansion
Recommended ReadingLatest update time:2024-11-16 21:47
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- Codecs - Optimized for C55x devices C55XCODECS
- Spectrum of the phase-locked loop output waveform
- 【nRF52840 DK Review】Bluetooth Mesh Test
- Live broadcast has ended [Microchip uses dsPIC33/PIC24 and ATECC608 devices to simplify security application design]
- Application of supercapacitors in power switching
- Protection circuit design specifications (Huawei internal data)
- Question about the output current of SN74LVC4245
- What does this statement about LDO mean?
- RISC-V developers say: IDE is not comfortable to use, but IAR already has a RISC version, but...
- Help: Some questions about Canaan K510 CRB-KIT development kit