ESP32 and Software UART

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
dvcam99
Posts: 89
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

ESP32 and Software UART

Post 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
Happy FC9, FC-8 and FC-6 professional user ;)

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ESP32 and Software UART

Post 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.

dvcam99
Posts: 89
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and Software UART

Post 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
Happy FC9, FC-8 and FC-6 professional user ;)

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ESP32 and Software UART

Post 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 43 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

dvcam99
Posts: 89
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: ESP32 and Software UART

Post by dvcam99 »

Hello Martin,

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

38400Baud is enought, I plan for 19200Baud.

THX
Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

Post Reply