S3C2440 External Interrupt

Source: Internet
Author: User

Previously, the PWM control buzzer was used to change the frequency of the buzzer. A bad thing is that the buzzer keeps ringing and can be closed in an interactive way. Select the buttons here. There are four buttons on the Development Board, corresponding to the four external interrupt eint0, eint1, eint2 and eint4 (why not eint0 ~ 3)

To use external interrupt, initialize the External Interrupt first. The external interrupt is reused with the external pins F and G. Configure the corresponding pins as the interrupt mode:



After configuring the pins, you also need to configure the specific interrupt function. We need to enable the shielding of a certain interruption so that we can respond to the interrupt. The corresponding register is intmsk. Some bits correspond to multiple external interruptions;




Because the bits correspond to multiple external interruptions, such as eint4 ~ 7 eint8 ~ 23 corresponds to a shielding bit of intmsk, so to precisely open an external interrupt, you need to configure eintmask. The following figure only lists some of them. For eint4 ~ 23 is applicable.





There must also be a trigger Method for external interruptions. Select low level, high level, rising edge, falling edge trigger, and so on. In this case, you must configure the extint register.




As described in the interrupt section of the S3C2440 processor in the previous blog post gun-UCOS, the hardware will set srcpnd and intpnd to 1 when the interrupt occurs, therefore, we need to clear the corresponding bit (reset by 1), and determine the specific external interrupt for the external interrupt, which depends on the eintpend register. This register also needs to be cleared by setting 1.
















Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.