Hardware flow control UART

Jan Kijonka
Posts: 27
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

User avatar
pratik
Posts: 460
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

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
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Jan Kijonka
Posts: 27
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 ?

User avatar
pratik
Posts: 460
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

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.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: No registered users and 1 guest