3 Replies Latest reply on Aug 12, 2015 2:06 PM by user_14586677

    Accessing pins in an ISR

    dale.kramer

      This is probably a stupid question but how to I access my pins in an ISR? (some include file I guess)

        • 1. Re: Accessing pins in an ISR
          user_14586677

          If you look at the system ref guide, help menu, there is an api section for GPIO.

             

           

             

          This also might help -

             

           

             

          http://www.cypress.com/?rID=93401     AN86439 - PSoC® 4 - Using GPIO Pins

             

           

             

          Regards, Dana.

          • 2. Re: Accessing pins in an ISR
            dale.kramer

            Thanks, I found the answer in AN90799 PSoC®4 Interrupts.

               

            The answer was to include the pinsname.h file.

               

            I have seen many examples with the CY_ISR routines in the main.c so I cut and pasted my routine out of its 'buried' location in the generated code into the main.c and it worked.

               

            Have not found any documentation that shows this yet, what are the pros and cons of this?

               

            Thanks,

               

            Dale

            • 3. Re: Accessing pins in an ISR
              user_14586677

              I have used both blindly w/o investigating the .lst file to see what code is

                 

              generated, if any code density/speed advantage one over the other.

                 

               

                 

              I think the C ISR a little more "readable" then hunting in non user generated files

                 

              for the placeholders. Also seems under user control it eliminates any changes on

                 

              tool vendor side.

                 

               

                 

              Regards, Dana.