Is it possible to add Rx Interrupts on the UART0

dallim30
Posts: 20
Joined: Thu Apr 29, 2021 1:35 am

Is it possible to add Rx Interrupts on the UART0

Postby dallim30 » Thu May 19, 2022 12:28 pm

Hello.

In ESP32 Wrover-E,
UART 0 is for the debugging and standard IO by default
Is it possible to add Rx Interrupts on the UART0?

Hope to get your help.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Is it possible to add Rx Interrupts on the UART0

Postby ESP_Sprite » Thu May 19, 2022 1:21 pm

Well, technically UART0 is the same as other UARTs, so yes. It gets a bit more complicated if you want to keep debugging output. Can you tell us what your specific use case here is?

dallim30
Posts: 20
Joined: Thu Apr 29, 2021 1:35 am

Re: Is it possible to add Rx Interrupts on the UART0

Postby dallim30 » Fri May 20, 2022 3:23 am

Thank you for your reply


I want to use UART0 for communication (reception/transmission) between a PC and an ESP32
and also keep debugging output.

Any help to resolve this issue is greatly appreciated ?

thanks

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Is it possible to add Rx Interrupts on the UART0

Postby ESP_Sprite » Fri May 20, 2022 8:02 am

The easiest way would be to install the UART blocking driver (note you don't need to set the pins as they're already correct here) and then either use the API described in there, or use the higher-level posix printf/getchar/... APIs that work on stdin/stdout.

dallim30
Posts: 20
Joined: Thu Apr 29, 2021 1:35 am

Re: Is it possible to add Rx Interrupts on the UART0

Postby dallim30 » Fri May 20, 2022 9:05 am

Thanks for your response


I need to receive data using UART0 received interrupt on non-blocking mode
I didn’t understand anything to read ESP32 datasheet.
Can you please help me to write the code for Arduino-ESP32.

Thanks

Who is online

Users browsing this forum: No registered users and 130 guests