ESP-32 UART component not supporting 9Bit Parity mode

For general Flowcode discussion that does not belong in the other sections.
Post Reply
dvcam99
Posts: 96
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

ESP-32 UART component not supporting 9Bit Parity mode

Post by dvcam99 »

Hello Matrix Team,

below you will find a shorts ESP-32 UART 9Bit opperation test program. This will show the situation.

Very positive in this context is that manual baud rate is working!!

To be very honest this missing 9Bit opperation is at the moment a show stopper in order to purchase a FC professional 9 upgrade for me.
ESP32_UART_Parity_Test_V1.fcfx
(8.89 KiB) Downloaded 396 times
Maybe this is an easy fix for you brillant experts!! ;)

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

LeighM
Valued Contributor
Posts: 447
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 81 times
Been thanked: 243 times

Re: ESP-32 UART component not supporting 9Bit Parity mode

Post by LeighM »

Hi Dirk,
The ESP32 UART driver does not support 9 bit data,
so you will not be able to send for example 0x1f0 as in your program.
However, if 8 bit data plus parity is what you need, then please try this ...

Set the Flowcode UART property to 8 bit
and add this C code ...

Code: Select all

uart_set_parity(1, UART_PARITY_EVEN);

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

Re: ESP-32 UART component not supporting 9Bit Parity mode

Post by dvcam99 »

Many thanks Leigh,

it works fantastic!! It´s is much better compared against my PIC UARTS.

I got rid of my complicated old parity calculation!! :D

In case that sombody wants to activate two stop bits!! Below the syntax for ESP32 compiler:

uart_set_stop_bits(1,UART_STOP_BITS_2);

BR

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

LeighM
Valued Contributor
Posts: 447
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 81 times
Been thanked: 243 times

Re: ESP-32 UART component not supporting 9Bit Parity mode

Post by LeighM »

Hi Dirk,
Glad to hear, thanks for letting us know
Leigh

Post Reply