Interrupt routine

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

cross mob
Anonymous
Not applicable

 Hi, I have been trying to set up a pin to implement a interrupt service routine (ISR) but it seems to do nothing. I may have forgotten to configure something I am affraid.

   

I´ve looked at everything I found but is still not working at all. 

   

I am using the cypress CY8C29466-24 PVTI (development kit). I also have the CY8C2421434. 

   

Can someone please give me a hand on that? Couldnt sort it out myself.

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

For PSoC1 there is a template-file named "boot.tpl". There you find the GPIO Interrupt entry. Write down a

   

"LJMP _MyHandler" // the underscore "_" is needed!

   

In main.c

   

#pragma interrupt_handler MyHandler

   

and later

   

void MyHandler(void)

   

{

   

    // Handle the interrupt

   

}

   

That's it

   

 

   

Bob

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

Some additional info here www.cypress.com/

   

and here www.cypress.com/

   

And: Welcome in the fascinating world of PSoCs!

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Don't forget to declare values modified in ISR to be "volatile"

   

 

   

Regards, Dana.

0 Likes