8 years ago.

InterruptIn per pin number

Hello,

I have found this post https://developer.mbed.org/questions/2737/Attaching-interrupt-to-pins-other-than-P/ and Erik Olieman said, that you can only have one interruptin per pin number, so if you make PC_5 an interrupt, you can not make PA_5 also one. Is that still true?

Thanks in advance

1 Answer

8 years ago.

For all STM32 targets that I am aware of: Yes. This is a hardware limitation and not a software one, there is one interrupt register, where a bit is high if an interrupt happened. But this is shared between all the ports, so there is no way to distinguish between PC_5 and PA_5 having an interrupt, in both cases bit 5 of that register is high.

Accepted Answer

I suppose infinite checking of inputs is the only solution, isn't it?

posted by Son Hai Nguyen 11 Apr 2016

Probably yes, of course next to not re-using the same pin number for interrupts.

posted by Erik - 11 Apr 2016