Hello ESP32 experts,
Hello Matrix team,
I would like to write to the following ESP32 UART register in order to invert the output signal:
UART_TXD_INV Set this bit to invert the level of the UART TxD signal. (R/W)
Can sombody please teach me what is the correct C-code /syntax in order to change this UART register.
Many thanks in advance
Dirk
ESP32 UART Register "UART_TXD_INV"
-
- Posts: 92
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 11:03 am
- Has thanked: 6 times
- Been thanked: 12 times
-
- Valued Contributor
- Posts: 402
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 75 times
- Been thanked: 220 times
Re: ESP32 UART Register "UART_TXD_INV"
Hi Dirk,
The function you need is ...
esp_err_t uart_set_line_inverse(uart_port_t uart_num, uint32_t inverse_mask);
Where uart_num is 0,1,2 etc, corresponding to Flowcode Channels 1,2,3
So if you are using Channel2, UART1, then the C code you require is ...
The function you need is ...
esp_err_t uart_set_line_inverse(uart_port_t uart_num, uint32_t inverse_mask);
Where uart_num is 0,1,2 etc, corresponding to Flowcode Channels 1,2,3
So if you are using Channel2, UART1, then the C code you require is ...
Code: Select all
uart_set_line_inverse(1, UART_SIGNAL_TXD_INV);
Re: ESP32 UART Register "UART_TXD_INV"
Hello Leigh,
wonderful perfect support!!!!
I can confirm it works in ESP32 hard. Pls. see following Scope Screen Shoot.
Many thanks!!
Dirk
wonderful perfect support!!!!
I can confirm it works in ESP32 hard. Pls. see following Scope Screen Shoot.
Many thanks!!
Dirk
Happy FC9, FC-8 and FC-6 professional user
Re: ESP32 UART Register "UART_TXD_INV"
Hello Leigh,
today I came again into the need in order to invert ESP32 UART lines. Since the above TX invert commands works very well I have the need to invert the UART RX line too.
I`ll tried modified command but unfortunately this is not working. At least if you put that command in the C-Box it re-inverts the TX line back.
Any ideas are welcome to overcome this problem.
BR
Dirk
today I came again into the need in order to invert ESP32 UART lines. Since the above TX invert commands works very well I have the need to invert the UART RX line too.
I`ll tried modified command
Code: Select all
uart_set_line_inverse(1, UART_SIGNAL_RXD_INV);
Any ideas are welcome to overcome this problem.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user
Re: ESP32 UART Register "UART_TXD_INV"
Hi Leigh,
I played a bit with the Syntax / Command and my the following was accepted by the compiler and the TX output is inverted too.
In the next days I can check if the UART RX port is accepting the inverted incoming signal too.
Further thoughts from your side are still welcome.
BR
Dirk
I played a bit with the Syntax / Command and my the following was accepted by the compiler and the TX output is inverted too.
Code: Select all
uart_set_line_inverse(UART_NUM_1, UART_SIGNAL_RXD_INV | UART_SIGNAL_TXD_INV);
Further thoughts from your side are still welcome.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user