• Skip to primary navigation
  • Skip to main content
FDI: Future Designs, Inc.

FDI

Future Designs, Inc.

  • Products
    • μEZ GUI
    • ELI
    • ΣyG
    • Modular Development Kits – DK
    • Other Products
    • End of Life
    • All Products (By part number)
  • Engineering Design
  • Production
  • Support
    • Forums
  • About FDI
    • News
    • Management
    • Partners
    • Distributors
    • Practices
    • Careers
    • New Customer Referral
  • Contact Us
  • Show Search
Hide Search

Register GPIO Interrupt in uEZ

Homepage › Forums › Modular Dev Kits › Q&A › Register GPIO Interrupt in uEZ

  • This topic has 0 replies, 1 voice, and was last updated 3 months ago by Logan Moon.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 6, 2025 at 9:14 pm #16753
    Logan Moon
    Keymaster

      (This message was transferred over from our old forum)
      Posted August 17, 2015
      By Todd DeBoer
      [hr]
      On 3/19/10 TONYC asked, “I have an I2C device that supports interrupt, which I have hooked up to the DK-TS-Kit. The interrupt line from the device goes to one of the free GPIO on the kit. Is there any way to register the this interrupt to the uEZ interrupt routines?”
      [hr]
      (Follow up post)

      There currently is not a way to do it with the uEZ API (making note to add feature). You’ll have to touch the hardware directly to enable this.

      However, the GPIO interrupts of the LPC2478 occur on the same interrupt as External Interrupt 3 (17).

      Sample code to enable this could look like follows:

      [code]
      #include
      #include

      IRQ_ROUTINE(GPIOIRQ_ISR);

      SomeRoutineReadiesIRQ()
      {
      IO0IntEnF |= (1<<4); // Enable P0.4 for falling edge interrupts IO2IntEnR |= (1<<3); // Enable P2.3 for rising edge interrupts InterruptRegister( INTERRUPT_CHANNEL_EINT3, GPIOIRQ_ISR, INTERRUPT_PRIORITY_NORMAL, “”GPIOIRQ””); } void ProcessGPIO0Interrupt(void) { // P0.4 falling? if (IO0IntEnF & (1<<4)) { // Process P0.4 falling here // … // Clear the interrupt IO0IntClr = (1<<4); } } ProcessGPIO2Interrupt(void) { // P2.3 rising? if (IO2IntEnR & (1<<3)) { // Process P2.3 rising here // … // Clear the interrupt IO2IntClr = (1<<3); } } IRQ_ROUTINE(GPIOIRQ_ISR) { IRQ_START(); if (IOIntStatus & IOIntStatus_P0Int) { // Port0 interrupt ProcessGPIO0Interrupt(); } if (IOIntStatus & IOIntStatus_P2Int) { // Port2 interrupt ProcessGPIO2Interrupt(); } IRQ_END(); } [/code]

    • Author
      Posts
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Partners

    NXP
    Renesas

    ARM
    SEGGER

    STMicroelectronics
    SAFERTOS

    FreeRTOS

    Copyright © 2025 Future Designs, Inc. | μEZ GUI | ELI | Engineering Design | Production | Privacy Policy | Log in