Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By debojitk
#68313 Hi,
I want to make a production board with ESP12 bare module is such a way that when I power it up it runs the existing sketch, without any further user intervention. Moreover I want to use GPIO0, 2, and 15 as normal GPIO after boot. The circuit should have components so that I can enter flash mode when i need to burn sketch on to it, but as it is not supposed to be a dev board, I am ok not to have automatic burn and reset feature inbuilt with the circuit. That means the most important requirement is to start automatically into boot mode, and using the aforementioned GPIOs for normal GPIO use.
Could anyone please help design this minimal circuitry?

Thanks,
Debojit
User avatar
By martinayotte
#68314 GPIO0/GPIO2 need to be pulled-up to VCC while GPIO15 need to be pulled-down to GND for proper boot process.
After having the ESP booted, you can use those GPIOs, for example, to drive LEDs. On GPIO2/GPIO0, LEDs can be driven in Sink mode, meaning cathode side to gpios, while for GPIO15, it is the reverse, it can drive in Source mode, meaning anode side.
User avatar
By rudy
#68315 Be aware that GPIO 12,13, 14 have pull ups enabled on start. Only 4 and 5 are high impedance at start. GPIO 15 must have a pull down resistor as Martin has said. I have used that to turn on a transistor to drive a drive relays. Also put a pull up on RX if you don't have anything that will drive it high on start.

How you use the pins is largely determined by what you need to connect with. You have what you need externally and you find the best compromise to connect to the ESP.
User avatar
By debojitk
#68324 Well, I need to add SD card, so GPIO12, 13, 14, 15 are gone for SPI. Besides I need to have two pins as inputs that I would use for interrupts, and two outputs to enable/drive other components, one of which is lock module.
The link http://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html describes how to utilize the boot related GPIOs to use after boot process. This is same as what martinayotte said in his post. This link also says that using these boot related GPIOs are easy to be utilized as output rather than input. So I plan to use GPIO0 and 2 as output mode (GPIO15 is already used in SPI), and GPIO4, 5 and 16 as inputs. Besides I don't want any firing of the pin that is attached with lock module.
Could anyone please check and tell if the aforementioned setup works or not.

Additionally I came to know that the 6 extra pins for ESP12E/F can be used to add SD card. Could anyone please put some light on this aspect as well. In this way I can save 4 IOs.

Thanks,
Debojit