How to activate RX interrupt on esp32

hello

Is there any way to activate RX interrupt on esp32? I am working on a project using nextion display, therefore I am trying to activate interrupt on uart in esp32, but I have no idea on how to do it. I could not even find a library that did this.

is there any way?

Regardless of whether you can utilise an interrupt of the RX pin itself, why not connect RX to another GPIO pin and interrupt on that.

Universal Asynchronous Receiver/Transmitter (UART) - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)

Using Interrupts

There are many interrupts that can be generated following specific UART states or detected errors. The full list of available interrupts is provided in ESP32 Technical Reference Manual > UART Controller (UART) > UART Interrupts and UHCI Interrupts [PDF]. You can enable or disable specific interrupts by calling uart_enable_intr_mask() or uart_disable_intr_mask() respectively. The mask of all interrupts is available as UART_INTR_MASK.... want to know more see the API.

Yes i stumbled upon this document but could not understand anything :joy:

It is a document on how to use the ESP32 API directly and gain more control of the ESP. The API, with a few adjustments, works under the Arduino IDE.

1 Like

Thanks i will surely look into it.

And I have a question id it possible to attach external interrupt to my RX pin(pin 16) and when that intterrupts occur and then I read the data ? Something like that

Yes.

May be helpful:
https://www.esp32.com/viewtopic.php?t=9939

Relevant: https://github.com/espressif/esp-idf/issues/805

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.