Page 1 of 1

ESP32 and Software UART

Posted: Fri Jul 14, 2023 1:32 pm
by dvcam99
Hello FC Team,

is there a known issue/problem in using software UART at a ESP32 device.

As soon as I select the Software UART the compiler will quit with a fault.

BR

Dirk

Re: ESP32 and Software UART

Posted: Fri Jul 14, 2023 3:51 pm
by BenR
Hi Dirk,

Software timing on the ESP32 is going to be tricky at best. is there a reason you can't use one of the hardware channels?

If not then I would recommend instead using the UART Software (timer) component.

Re: ESP32 and Software UART

Posted: Sat Jul 15, 2023 7:14 pm
by dvcam99
Hi Ben,

I´ll need 3 UARTS for my project. ESP32 UART 2 and 3 are doing fine. UART 1 at the ESP 32 is used for USB flashing too I assume.

If I enable UART-1 for my puroose the ESP is reseting from time to time.

This is the reason why I would like to use software UART.

BR

Dirk

Re: ESP32 and Software UART

Posted: Sat Jul 15, 2023 9:32 pm
by mnfisher
I did a software receive for esp32 uart - and it's quick enough to work at up to 38400baud (adjust the timing). I suspect using the RMT hardware would allow send/receive at most speeds.
My idea was to work with 9 bit UART - but in the end I didn't need to go any further with this..
uart test esp32.fcfx
(17.49 KiB) Downloaded 44 times
Is a simple demo/proof of concept - I tested using a FTDI converter connected to a PC using RealTerm to allow speed/no. bits etc to be tweaked..

Martin

Re: ESP32 and Software UART

Posted: Sat Jul 15, 2023 9:54 pm
by dvcam99
Hello Martin,

many thanks I will it check out next, looks very intersting.

38400Baud is enought, I plan for 19200Baud.

THX
Dirk