I have a question about possible conflicts with external interrupts on a Metro M4 clone using the SAMD51. This chip has external interrupts available on 40 some pins, but many of these are shared internally. So for example it is not possible to use an external interrupt on both PB02 and PA18 as these share EXTERNAL_INT_2 .
My question is whether the use of a serial protocol on certain pins means that the associated EXTERNAL_INT is "used". For example, pin PB02 is used as I2C on the Metro M4. Does this mean that if I use I2C on that pin I cannpt also have an external interrupt on PA18 (as both use EXTERNAL_INT_2). Does the same hold for MISO (PA14) conflicting with PB14 as both share EXTERNAL_INT_14?
Yes, it's possible to set up one pin as a serial port and another as an interrupt, even though they both share the same interrupt channel.
Each pin has a port pin multiplexer (PMUX), which switches between various peripherals. The External Interrupt Controller (EIC) is on multiplexer switch position A, while the SERCOM serial communication modules are on positions C and D. This means that signals incoming on the interrupt pin won't affect the SERCOM and vice versa.
Hi @MartinL and @westfw
Thanks both for your replies, which solve my problem and give me a clue about the multiplexing for a better understanding of how the interrupts work. Solved!