Page 1 of 1

ESP32 UART interrupts

Posted: Mon Sep 28, 2026 8:10 am
by mnfisher
Not so much a bug as a 'gotcha'.

On most MCUs (at least AVR and PIC) - using a Rx interrupt on a UART the interrupt is UARTRXn where n is the channel number - 1.

On the esp32 - n is the channel number. This is, of course, much more sensible - but change for other devices might break many things?

The esp32 UART is rather different to other MCUs (there is a hardware buffer for example) - and behaves more like a PC UART. However, I was aiming for portable code that would work on a range of devices. The component doesn't really allow for this functionality to be used.

It's easy enough to work around (with an #ifdef ...).if nothing else.

Martin

Re: ESP32 UART interrupts

Posted: Mon Sep 28, 2026 9:03 am
by mnfisher
.. which explains why my EB3 experiments (with 2 UARTs) didn't work :-(