The specified IO has an interrupt. The port already contains an IO with an interrupt.

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

cross mob
Zheng_Li
Level 1
Level 1
5 sign-ins First reply posted First question asked

 

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
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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
Moderator
500 replies posted 50 likes received 250 sign-ins

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
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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."

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

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