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
  • shabaz
    shabaz over 5 years ago

    Hi Eivind,

     

    I have not checked the documentation, but I know how I would find out, so I can point you in the right direction.

    The DIO_SRC_DIO_0 is most likely (I'm guessing) indicating which pin you wish to use for the interrupt. The RSL10 chip is unusual (in a good way) in that any pin can be used for any feature, as far as I know (I could be wrong). Anyway, if you want to be certain how to use that API call, just hit F3 in the IDE, and it will find the definition and it will be described.

    To me it doesn't seem any other library needs to be used. You're currently using C and a low-level API which should meet your needs for things like I/O and interrupts.

    It looks very straightforward. As for breakpoints, I have not used them with the RSL10. Maybe you're running in Release mode instead of Debug mode. Anyway, you could step through if you really wanted to. Alternatively as a workaround, you could just light an LED to test how far in the code you have got.

    EDIT: One more thing, perhaps interrupts need to be enabled globally too. Usually (at least with other microcontrollers), once you have configured up individual interrupts, there's a master-control to enable or disable that configuration.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mahmood.hassan
    mahmood.hassan over 5 years ago in reply to shabaz

    Yes it is true that any GPIO can be used for any digital function.

    DIO-0 to DIO-3 are analog inputs and again any of these pin can be connected with any channel of ADC.

     

    The DIO_SRC_DIO_0 is most likely (I'm guessing) indicating which pin you wish to use for the interrupt. The RSL10 chip is unusual (in a good way) in that any pin can be used for any feature, as far as I know (I could be wrong). Anyway, if you want to be certain how to use that API call, just hit F3 in the IDE, and it will find the definition and it will be described.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • mahmood.hassan
    mahmood.hassan over 5 years ago in reply to shabaz

    Yes it is true that any GPIO can be used for any digital function.

    DIO-0 to DIO-3 are analog inputs and again any of these pin can be connected with any channel of ADC.

     

    The DIO_SRC_DIO_0 is most likely (I'm guessing) indicating which pin you wish to use for the interrupt. The RSL10 chip is unusual (in a good way) in that any pin can be used for any feature, as far as I know (I could be wrong). Anyway, if you want to be certain how to use that API call, just hit F3 in the IDE, and it will find the definition and it will be described.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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