cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Zheng_Li
New Contributor

 

When I config a input pin with interrupt as follow:

Zheng_Li_2-1616741864510.png

There is a compile error.

Zheng_Li_1-1616741830136.png

Why it happens? And how to remove the error except change the pin?

0 Likes
1 Solution
Len_CONSULTRON
Honored Contributor II

Zheng_Li,

You are correct.  This generates the same error you received because the IRQs are allocated on the same port.

 

Len_CONSULTRON_2-1616803225505.png

However this configuration doesn't yield and error.

Len_CONSULTRON_3-1616803353258.png

Once in the ISR, you need to determine which input caused it.

 

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

4 Replies
ncbs
Moderator
Moderator

Hello @Zheng_Li 

Please provide more information regarding the device being used and the project.

Are any other components trying to provide interrupts to the same GPIO? Has the GPIO been configured to accept interrupts?
Providing your archived project would be easier to debug.
To do so, perform the following in PSoC Creator IDE: File->Create Workspace Bundle (minimal)

Regards
Nikhil

0 Likes
Len_CONSULTRON
Honored Contributor II

Zheng_Li,

You are correct.  This generates the same error you received because the IRQs are allocated on the same port.

 

Len_CONSULTRON_2-1616803225505.png

However this configuration doesn't yield and error.

Len_CONSULTRON_3-1616803353258.png

Once in the ISR, you need to determine which input caused it.

 

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

Zheng_Li
New Contributor

Hi Len,

Thanks for your replying.

I understand that the reason for the error is that there is only one input interrupt per port.

I distribute each input pin to each port in order not to determine the source of interrupt.

There is no error any more.

0 Likes
Len_CONSULTRON
Honored Contributor II

Zheng_Li,

I'm glad you solved your issue.

If you did need to have separate interrupts on multiple pins on the same port, there are ways to achieve this.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes