element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Think ON Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Think ON Design Challenge
  • More
  • Cancel
Think ON Design Challenge
Forum Interrupt on PIN_GIO_SPARE
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 4 subscribers
  • Views 1450 views
  • Users 0 members are here
Related

Interrupt on PIN_GIO_SPARE

eivholt
eivholt over 5 years ago

Hi, I'm having some problems with interrupts. I want the available pin GIO to trigger an interrupt in my code. So far I have started with bdk_blinky and been able to read the pin configured as such:

Sys_DIO_Config(PIN_GIO_SPARE, DIO_NO_PULL | DIO_LPF_ENABLE | DIO_MODE_GPIO_IN_0);

I am trying to understand the API on how to configure interrupts. I have tried this:

 

Sys_DIO_IntConfig(0,

DIO_DEBOUNCE_ENABLE |

DIO_SRC_DIO_0 |

DIO_EVENT_HIGH_LEVEL,

DIO_DEBOUNCE_SLOWCLK_DIV32,

0);

 

experimenting with the parameters. I have implemented:

 

void DIO0_IRQHandler(void){

LED_On(LED_BLUE);

}

 

with breakpoint. It never hits.

 

Can anyone explain what index and DIO_SRC_DIO_* means in this context and what I can use? Should I use another library?

I tried to modify the bdk_button to use the PIN_GIO_SPARE pin instead of button0, but to no avail.

  • Sign in to reply
  • Cancel

Top Replies

  • eivholt
    eivholt over 5 years ago in reply to eivholt +1
    The interrupt handles override the default ones regardless of them being defined extern or not. See the next post about conditions before registrering interrupts. Learning something about C every day
Parents
  • eivholt
    eivholt over 5 years ago

    I believe I have found a likely explanation for the interrupt handlers not triggering; I did not realize I had to declare the handler like this:

    extern void DIO0_IRQHandler(void);

    My implementation does not declare the override in the right scope and the default implementations are probably still being run. At least it's worth checking out. Will post an update.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eivholt
    eivholt over 5 years ago

    I believe I have found a likely explanation for the interrupt handlers not triggering; I did not realize I had to declare the handler like this:

    extern void DIO0_IRQHandler(void);

    My implementation does not declare the override in the right scope and the default implementations are probably still being run. At least it's worth checking out. Will post an update.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • eivholt
    eivholt over 5 years ago in reply to eivholt

    The interrupt handles override the default ones regardless of them being defined extern or not. See the next post about conditions before registrering interrupts. Learning something about C every day image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube