Accessing pins in an ISR

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

cross mob
Anonymous
Not applicable

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

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

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.

0 Likes
Anonymous
Not applicable

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

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

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.

0 Likes