ISR not executing.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Mrinal
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

I have an ISR component ISR_1 connected to the OV pin of a PWM block.

   

In the main file I have the following code:

   

CY_ISR_PROTO(MyISR);
CY_ISR(MyISR)
{
    PWM_1_Stop();
}

   

int main()
{

   

 

   

    PWM_1_Start();
    ISR_1_StartEx(MyISR);
    CyGlobalIntEnable;
}

   

 

   

PWM should stop as soon as the interrupt is executed. But it does not.

   

Please help

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are probably missing the infinite loop that keeps the cpu running. When main() ends, quo vadis ???

   

Next time can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Mrinal
Level 4
Level 4
First solution authored 50 replies posted 25 replies posted

Thanks for the reply.

   

Of course I missed the infinite loop, but that wasn't the reason behind not executing the ISR.

   

Actually the ISR is executing, however the PWM_Stop() command was not working. It is ok now.

   

My bad, sorry!

0 Likes