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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum Stucked int Interrupt??
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 4 replies
  • Subscribers 25 subscribers
  • Views 624 views
  • Users 0 members are here
Related

Stucked int Interrupt??

Former Member
Former Member over 12 years ago

I just wanna test the interrupt of psoc4, using CY8CKIT.

After power up, and pressed the button,it entered the int handler but it stucked in the handler and can't back to main()...

 

main:

#include <device.h>

 

void button_int(void)

{

    isr_1_ClearPending();

    green_Write(1);

    CyDelay(1000);

}

 

void main()

{

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    isr_1_StartEx(button_int);

    CyGlobalIntEnable;  /* Uncomment this line to enable global interrupts. */

    for(;;)

    {

        green_Write(1);

        CyDelay(500);

        green_Write(0);

        CyDelay(500);

        green_Write(1);

       

        /* Place your application code here. */

    }

}

 

/* [] END OF FILE */

imageimage

A falling edge of button pin will cause an interrupt,

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 12 years ago

    HI

    Do not use delay in interrupt routine.

    If you complete interrupt process, exit the routine as immediately.

     

    When using Pins module,

    you might be need Pin_ClearInterrupt() ;

    It may depend on PSoC device.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago in reply to Former Member

    hi~~thank you~

    i gotta it solved.

    The problem happened in the pin configuration. I canceled the pin interrupt and use isr_1_SetPending(); in the main function to call the interrupt function.It got work,and exit the interrupt function successfully.

    image

    Next , I canceled the pin's interrupt and set interrupt in isr_1. Button pressed ,It got work.

    So the problem must be in the pin configuration. But I still don't know...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jesusantoniocar
    0 jesusantoniocar over 12 years ago in reply to Former Member

    Hello zgbkdlm.

    Thanks for share your problem and solution, it help us .

     

    thanks too to Junichi Hiraoka ,you know a lot about psoc, I read many of your contributions to the forum of cypress

     

    Regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago in reply to jesusantoniocar

    Hi jesusantoniocar-san, "Konnitiwa"

    I am new to this forum.

    Someone told me need help to this article, by the Twitter.

    I'm full of hands with the Cypress forum,

    So I couldn't watch this forum might be.

    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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