Hardware flow control UART
-
- Posts: 28
- Joined: Fri Jun 09, 2017 10:17 pm
Hardware flow control UART
Postby Jan Kijonka » Mon Sep 04, 2017 8:42 pm
Hi,
Is it possible to communicate between a host MCU and ESP12-E via UART using hardware flow control and AT+Commands ?
If so, do you have some connection diagram for GPIO RTS/CTS connection and software setup ?
Thank you,
Jan
Is it possible to communicate between a host MCU and ESP12-E via UART using hardware flow control and AT+Commands ?
If so, do you have some connection diagram for GPIO RTS/CTS connection and software setup ?
Thank you,
Jan
Re: Hardware flow control UART
Postby pratik » Tue Sep 05, 2017 4:37 pm
The UART baud rate configuration AT command can be used to enable flow control. Please check the AT command documentation for your version of the firmware.
As for the GPIOs, when flow control is enabled:
GPIO12 = U0DTR
GPIO13 = U0CTS
GPIO14 = U0DSR
GPIO15 = U0RTS
As for the GPIOs, when flow control is enabled:
GPIO12 = U0DTR
GPIO13 = U0CTS
GPIO14 = U0DSR
GPIO15 = U0RTS
-
- Posts: 28
- Joined: Fri Jun 09, 2017 10:17 pm
Re: Hardware flow control UART
Postby Jan Kijonka » Wed Sep 06, 2017 4:03 pm
Dear pratic,
I looked for the flow control in AT Commands sheet. I have only found "AT+UART" command, which allow flow control:
<flow control>: flow control
‣ 0: flow control is not enabled
‣ 1: enable RTS
‣ 2: enable CTS
‣ 3: enable both RTS and CTS
But what about DTR (Data Terminal Ready) - GPIO12 and DSR (Data Set Ready) GPIO14 ? Are these sognals also included when I enable only RTS and CTS ?
I looked for the flow control in AT Commands sheet. I have only found "AT+UART" command, which allow flow control:
<flow control>: flow control
‣ 0: flow control is not enabled
‣ 1: enable RTS
‣ 2: enable CTS
‣ 3: enable both RTS and CTS
But what about DTR (Data Terminal Ready) - GPIO12 and DSR (Data Set Ready) GPIO14 ? Are these sognals also included when I enable only RTS and CTS ?
Re: Hardware flow control UART
Postby pratik » Wed Sep 06, 2017 10:04 pm
You can only use RTS and CTS, but that is typically enough for most applications where you want to control data flow in case your host is slow to process data.
I'd suggest allowing the UART flow from ESP->host always when the host can process data.
I'd suggest allowing the UART flow from ESP->host always when the host can process data.
Re: Hardware flow control UART
Postby sarahah » Wed Oct 25, 2017 5:57 pm
Hi
I am trying to connect PC with PIC24F002 UART using Rx/Tx and RTS/CTS cross connected along with level translator as MAX3232.
Now as per Datasheet of PIC24FJ.. MCU UART can send data when it detects Low on its CTS pin, while PC as default and in Hardware flow control makes its RTS in MARK state (means negative) that gets translated to High Logic and blocks UART to send any data.
Similarly the other side of data communication blocked.
In all it looks like RTS/CTS pair from MCU <---> Level Translator <---> PC are mis-matched in their logic when used with Hardware Flow Control full duplex mode.
Although, there is Logic Inversion possible with Rx/Tx but that does not seem to be available for RTS/CTS.
What could be the options then? Any idea? What is wrong here?
I am trying to connect PC with PIC24F002 UART using Rx/Tx and RTS/CTS cross connected along with level translator as MAX3232.
Now as per Datasheet of PIC24FJ.. MCU UART can send data when it detects Low on its CTS pin, while PC as default and in Hardware flow control makes its RTS in MARK state (means negative) that gets translated to High Logic and blocks UART to send any data.
Similarly the other side of data communication blocked.
In all it looks like RTS/CTS pair from MCU <---> Level Translator <---> PC are mis-matched in their logic when used with Hardware Flow Control full duplex mode.
Although, there is Logic Inversion possible with Rx/Tx but that does not seem to be available for RTS/CTS.
What could be the options then? Any idea? What is wrong here?
Re: Hardware flow control UART
Postby renchin » Tue Dec 12, 2017 12:35 pm
I have used a logical analyzer to monitor the RTS signal, and the voltage level of RTS pin was always low, I think the hardware flow control of ESP8266 can not work, maybe there are some bugs on the firmware.
Who is online
Users browsing this forum: No registered users and 4 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.