You are here

GPIO ISR is not executed | Cypress Semiconductor

GPIO ISR is not executed

Summary: 6 Replies, Latest post by rjvb on 01 Dec 2012 08:19 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Borstenhorst's picture
User
16 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

Attachments: 
Borstenhorst's picture
User
16 posts

I also uncommented M8C_EnableGInt ;

user_14586677's picture
User
7645 posts

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

mask to figure out what pin did it.

 

Regards, Dana.

user_1377889's picture
User
9606 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

Borstenhorst's picture
User
16 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 :)

 

 

rjvb's picture
Cypress Employee
90 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

user_14586677's picture
User
7645 posts
Log in to post new comments.