ESP32 UART interrupts

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
mnfisher
Valued Contributor
Posts: 2185
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 177 times
Been thanked: 1026 times

ESP32 UART interrupts

Post 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

mnfisher
Valued Contributor
Posts: 2185
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 177 times
Been thanked: 1026 times

Re: ESP32 UART interrupts

Post by mnfisher »

.. which explains why my EB3 experiments (with 2 UARTs) didn't work :-(

Post Reply