Custom ISR's

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

cross mob
JiGi_284761
Level 4
Level 4
Welcome!

Ive been using the auto generated ISR's and am trying to use the Custom ISR's using the CY_ISR_PROTO() approach.

   

The compiler keeps telling me that " isr_1_StartEx(whatever)"  is a undeclared identifier "whatever"

   

Any Ideas? Im sure it is something simple......

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

This discusses PROTO implementation -

   

 

   

    

   

          

   

http://www.cypress.com/?rID=38267     AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts

   

 

   

 

   

 

   

Alternatively post your project for forum to look at -

   

 

   

    

   

          

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

Use Firefox or IE, not chrome to post.

   

 

   

 

   

Regards, Dana.

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

The CY_ISR_PROTO(Handler) macro only declares your interrupt handler, later on you have to DEFINE it with

   

CY_ISR(Handler)

   

{

   

    // Handler Body

   

}

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
JiGi_284761
Level 4
Level 4
Welcome!

Thanks guys.

   

I found the original problem. needed to link the files.

   

 

   

However there is another problem. Here is a simple program using 2 timers to flash 2 led's using interrupts. Only one will flash even thou the code is exactly the same for each one. Ive had this problem before using multiple interrupts so I usually just poll.

   

This is on the CY8CKIT-050 kit. 

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

Change this -

   

    isr_1_StartEx(light);
    isr_1_StartEx(light2);

   

to this -

   

    isr_1_StartEx(light);
    isr_2_StartEx(light2);

   

 

   

Regards, Dana.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Hi Dana. Yes, found it myself just as soon as I posted...

   

Thanks

0 Likes