Interrupt routine

Discussion of the PSoC CY8C24x94 and other PSoC like USB parts from Cypress should be discussed here. This forum is limited to the discussion of USB portion of those parts. Other forums should still be used to discuss the non USB features of these parts.

Moderator: ericb

Interrupt routine

Postby Sammy » Tue Feb 26, 2013 5:20 am

Hi ,
I am a newbie ..I am running a code in debug mode ..and it gets stuck in ISR do I get out of that and Run the code like other simple C or any other codes ...?????

Posts: 6
Joined: Tue Feb 19, 2013 3:29 am

Re: Interrupt routine

Postby bobmarlowe » Tue Feb 26, 2013 9:26 am

I always was annoyed by this "Error" when debugging my programs. Now I've earnt that it cannot be cured, the reason is
When stepping through the program or reaching a breakpoint thee processor is halted, but the hardware is not and so producing interrupts which become "pending" but cannot be handled since the processor does not run. Now, when runnig again the program the interrupt handler will drop in to do what its name says: handle the interrupt and then return to the original point where it comes from and - there is the breakpoint, so stops and a new interrupt will be pending within a short time.

There are two ways out of this:
First is: When halted at a breakpoint, remove this breakpoint and set a new one a bit later (down) in your Program. When now you run again, the pending interrupt will be worked on but execution will halt at the next breakpoint.

Second: Disable the interrupts. Exactly for this scenario Cypress gave you in Creator 2.2 a new Button to disable (and enable) interrupts after the program is halted at a breakpoint.

Happy de-bugging
User avatar
The Big Cheese
The Big Cheese
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Return to “%s” USB

Who is online

Users browsing this forum: No registered users and 1 guest