I wonder if there may be any problems using the pins that the UART are using as GPIOs, if now I want to be able to reprogram the circuit? (Of course I will detach the ESP12-E from the mainboard before so)
-
1flash mode is achieved using a combination of GPIO 0, 2 and 15 ... so, since UART is on 1 and 3, it will be flashable if powered up with 0-LOW, 2-HIGH and 15-LOW - since your sketch won't be running in this modeJaromanda X– Jaromanda X2019年05月06日 10:09:43 +00:00Commented May 6, 2019 at 10:09
-
keep in mind that this pins are the only way to change the application in esp8266 in any case. (OTA is the other way, but it must be supported by the running application)Juraj– Juraj ♦2019年05月06日 11:14:38 +00:00Commented May 6, 2019 at 11:14
1 Answer 1
Sure, you can use the UART pins as general purpose IO pins - however, it's far from ideal - for one simple reason:
- The ROM issues messages on the UART at boot time.
This means that when you power the chip up whatever is connected to the UART TX pin will receive pulses of HIGH and LOW.
That may or may not be a problem, depending on what is connected. It's something you need to bear in mind though.
-
Is the UART TX pin the only pin of this concern then?Anton Ingemarson– Anton Ingemarson2019年05月06日 11:03:18 +00:00Commented May 6, 2019 at 11:03
-
Yeah. The RX pin is an input, and during normal boot isn't actually used for anything.Majenko– Majenko2019年05月06日 11:04:50 +00:00Commented May 6, 2019 at 11:04
-
However, the RX (gpio3) pin is apparently pulled HIGH on boot, just like pins 12, 13 and 14 - also, driving gpio 1 (TX) low on boot will prevent boot - one common use for RX is
i2s
- it's theSD
pin for i2s outputJaromanda X– Jaromanda X2019年05月07日 01:24:29 +00:00Commented May 7, 2019 at 1:24