Skip to content

Commit 3598917

Browse files
author
Veijo Pesonen
committed
Updates README.md to include information how to enable UART HW flow control
1 parent eb3deb0 commit 3598917

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,42 @@ ESP8266 modules come in different shapes and formats, but the most important fac
1111
- The ESP8266 WiFi module does not allow the TCP client to bind on a specific port.
1212
- Setting up a UDP server is not possible.
1313
- The serial port does not have hardware flow control enabled. The AT command set does not either have a way to limit the download rate. Therefore, downloading anything larger than the serial port input buffer is unreliable. An application should be able to read fast enough to stay ahead of the network. This affects mostly the TCP protocol where data would be lost with no notification. On UDP, this would lead to only packet losses which the higher layer protocol should recover from.
14+
15+
## UART HW flow control
16+
17+
UART HW flow control requires you to additionally wire the CTS and RTS flow control pins between your board and your ESP8266 module. Once this is done remember to add configuration option for flow control in your app config file. Here a [ST NUCLEO-F429ZI](https://os.mbed.com/platforms/ST-Nucleo-F429ZI/) board and [ESPBee XBee Module](https://www.cascologix.com/product/espbee/) are used as an example.
18+
19+
Once you have your HW set up add configuration like this in your app config - Arduino pins D1 and D0 assumed for TX and RX:
20+
21+
``` javascript
22+
"target_overrides": {
23+
"NUCLEO_F429ZI": {
24+
"esp8266.rts": "PG_12",
25+
"esp8266.cts": "PG_15"
26+
}
27+
```
28+
29+
### Example board pins
30+
1. TX - D1 (Arduino Uno Revision 3 connectivity headers)
31+
2. RX - D0 (Arduino Uno Revision 3 connectivity headers)
32+
3. RTS - PG_12 (STMicroelectronics Morpho extension pin headers)
33+
4. CTS - PG_15 (STMicroelectronics Morpho extension pin headers)
34+
35+
### Example ESP8266 pins
36+
1. TX - D1 (Arduino Wireless Protoshield headers)/ TX (ESPBee XBee headers)
37+
2. RX - D0 (Arduino Wireless Protoshield headers)/ RX (ESPBee XBee headers)
38+
3. RTS - RTS (ESPBee XBee headers)
39+
4. CTS - CTS (ESPBee XBee headers)
40+
41+
### Connections
42+
With these pictures only consider the green and yellow wires which are connected to ESP8266. Pink wire is for reset and the rest for firmware update. TX and RX go through Arduino pins D1 and D0.
43+
44+
*NOTE* GPIO15(ESPBee RTS) needs to be pulled down during startup to boot from flash, instead of firmware update or boot from SD card. Once the software is running the same pin is used as the RTS pin
45+
46+
1. Board TX - ESP8266 RX
47+
2. Board RX - ESP8266 TX
48+
3. Board RTS(grey) - ESP8266 CTS(yellow)
49+
4. Board CTS(white) - ESP8266 RTS(green)
50+
51+
![RTS,CTS](nucleo_esp8266_hw_fc1.jpg)
52+
![RTS,CTS](nucleo_esp8266_hw_fc2.jpg)

nucleo_esp8266_hw_fc1.jpg

2.15 MB
Loading

nucleo_esp8266_hw_fc2.jpg

2.11 MB
Loading

0 commit comments

Comments
 (0)