UARTs and interrupts

The TInyClr documentation says:

Input events use interrupts (IRQs). Interrupts are only available on 16 pins at any given time. Of those 16 pins, the pin number must be unique. For example: PA1 and PB1 cannot both be used as interrupts at the same time. However, PA1 and PB2, or even PA1 and PA2, can be used simultaneously with interrupts.

When using a UART, does the RX pin consume an interrupt?

Does any other functionality consume interrupts? Such as PWM, I2C, CAN, etc…

It doesn’t. It uses the uart interrupt source, not gpio interested source.

That note only effects gpio.

1 Like

Yes, the UART interrupts are not GPIO interrupts. Use of UARTs will have no affect on the availability of GPIO interrupts.

However, peripherals such as WiFi or ENC Ethernet do use GPIO interrupts, and this does limit the available GPIO interrupt pins. For example, the FEZ Bit uses PA10 for the WiFi IRQ. When using WiFi on the FEZ Bit, the tenth GPIO pin on any of the GPIO ports (PA10, PB10, PC10 . . .) cannot be used with interrupts.

1 Like

I would say this differently: drivers such as WiFi and touch screen do use a gpio interrupt pin. And so they consume one of the 16 available gpio interrupts internally.