You are here

Interrupt routine | Cypress Semiconductor

Interrupt routine

Summary: 3 Replies, Latest post by danaaknight on 02 Jul 2014 02:22 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
pedrov's picture
6 posts

 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.

user_1377889's picture
9268 posts

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



user_1377889's picture
9268 posts

Some additional info here

and here

And: Welcome in the fascinating world of PSoCs!




user_14586677's picture
7646 posts

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


Regards, Dana.

Log in to post new comments.