Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > GPIO ISR is not executed

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



GPIO ISR is not executed
Moderator:
ARVI

Post Reply
Follow this topic



GPIO ISR is not executed

Borstenhorst posted on 19 Oct 2012 9:47 AM PST
Member
3 Forum Posts

I begin to desperate, hopefully you can help :)

 

1. Changed Pind to "Pull down" and "Change from read"

2. added "ljmp _foo" to PSoCGPIOINT.asm

3. added

 #pragma interrupt_handler foo

int counting=0;

void foo(void)
{
    counting++;
    return;
}

to main.c.

 

The pin is working but the value is now increased when the is a edge.

I also attached the whole project.

 

Thanks for support




Re: GPIO ISR is not executed

Borstenhorst posted on 19 Oct 2012 09:48 AM PST
Member
3 Forum Posts

I also uncommented M8C_EnableGInt ;



Re: GPIO ISR is not executed

danaaknight posted on 19 Oct 2012 01:00 PM PST
Top Contributor
1773 Forum Posts

Some useful ref material on setting up ISR on GPIO and other -

http://www.cypress.com/?id=4&rID=36720

http://www.planetpsoc.com/component/content/article/43-writing-a-c-isr.html

http://www.planetpsoc.com/psoc1-articles-digital/13-basics-of-psoc-gpio.html?start=7

 

Regards, Dana.



Re: GPIO ISR is not executed

danaaknight posted on 19 Oct 2012 01:02 PM PST
Top Contributor
1773 Forum Posts

One further note, GPIO isr's are aggragated, you need to use a

mask to figure out what pin did it.

 

Regards, Dana.



Re: GPIO ISR is not executed

Bob Marlowe posted on 19 Oct 2012 01:13 PM PST
Top Contributor
1768 Forum Posts

You have three pins enabled for interrupt, one of them is change from read. Since you read the port within the loop, ANY change of the signal (both edges) will trigger an interrupt. Test that by stop reading from the port, you'll see.

 

Happy coding

Bob



Re: GPIO ISR is not executed

Borstenhorst posted on 19 Oct 2012 02:43 PM PST
Member
3 Forum Posts

Thanks a lot for the links, I will read carefully trough it when I have the time.

A colleague from my university made it with

M8C_EnableIntMask(INT_MSK0, INT_MSK0_GPIO);

and maybe some other changes, I currently searchung for them :P

Anyway, I want to understand how it works, so thank you once again.

To give you an idea what I want to do. I want to read the Ulsewidth vom an RC-Remote into the PSoC. The idea is to use just one counter for different signals as they are never come at the same time. Therefore i will check inside the isr which pin is high and at the falling edge it will safe the value in on of a few variales.

So this was the idea and the reason why I have more than 1 PINs as Interrupt :)

 

 



Re: GPIO ISR is not executed

rjvb posted on 01 Dec 2012 06:19 AM PST
Cypress Employee
88 Forum Posts

This application note (AN2094 - PSoC 1 - Getting started with GPIO) will also help in your application.

http://www.cypress.com/?rID=2900

-Rajiv Badiger






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20