If the following settings are not followed, the interrupt will not be executed or the next interrupt will not be entered.
/*Interrupt suspension setting, this process is added to the main function and loaded at startup*/
void Eint_wait()
{
rSRCPND=rSRCPND; //Interrupt pending register clear
rINTPND=rINTPND; //Interrupt source pending register clear
rEINTPEND|=0x1<<13; //External interrupt pending register, Eint pending interrupt
rSRCPND=BIT_EINT8_23; //Interrupt source pending register corresponding position 1 waiting for interrupt
rINTPND=BIT_EINT8_23; //Interrupt pending register corresponding position 1 waiting for interrupt
}
/*End of interrupt suspend setup*/
/*The following is the processing procedure when responding to an interrupt, which is the function in the pISR pointer*/
void __irq Eint_Isr(void)
{
if(rEINTPEND == (1<<13)) //When judging whether Eint13 has a response, execute as follows
{
rGPBDAT=0x0<<6; //led6 is on
delay(10000); //Description: Since the edge triggering method is used, the edge process will be completed after the button is pressed. After completion, the else processing will be immediately entered and the light will be turned off. The naked eye may not be able to see it. In order to see the effect, the LED needs to be on for a while!
rEINTPEND=(1<<13); //Set the interrupt suspend register Eint13 to 1 and wait for the next interrupt to arrive. If the next interrupt is not set, the program cannot enter.
}
else //When it is not Eint13, execute as follows
{
rGPBDAT=0x1<<6;
rEINTPEND=(1<<13); //Set the interrupt suspend register Eint13 to 1 and wait for the next interrupt to arrive. If the next interrupt is not set, the program cannot enter.
}
}
The above two parts are important contents of simplified interrupt processing, which can be used by modifying rGPBDAT and rEINTPEND according to the output pin. Other settings are not explained here.
Previous article:Samsung S3C2440A Nand Flash Mapping
Next article:S3C2440 development board uses external interrupts to implement button switching of different functions
Recommended ReadingLatest update time:2024-11-16 14:32
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
- Competition control competition materials and excellent works sharing
- NUCLEO_G431RB Review (1) Compilation Environment Settings
- EEWORLD University - Practical Application of IoT in Vehicles
- Memory Compression Technology in Embedded Systems
- Porting shttpd Web
- Why are all the packets captured by USB Dongle empty?
- Share and discuss: About the VDDIO and VLDO pins of the LP8863ADCPRQ1 chip
- TI releases mmWave fundamentals (white paper)
- Ultra-low power Bluetooth controlled, cost-effective, dimmable smart lighting solution
- Does anyone have the latest download link for Altium Designer Beta 19.1.7? Please share it with me. Thank you!