5 Replies Latest reply on Aug 4, 2014 6:20 PM by jim.gilmartin

    Custom ISR's

    jim.gilmartin

      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......

        • 1. Re: Custom ISR's
          user_14586677

          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.

          • 2. Re: Custom ISR's
            bob.marlowe

            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

            • 3. Re: Custom ISR's
              jim.gilmartin

              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. 

              • 4. Re: Custom ISR's
                user_14586677

                Change this -

                   

                    isr_1_StartEx(light);
                    isr_1_StartEx(light2);

                   

                to this -

                   

                    isr_1_StartEx(light);
                    isr_2_StartEx(light2);

                   

                 

                   

                Regards, Dana.

                • 5. Re: Custom ISR's
                  jim.gilmartin

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

                     

                  Thanks