User avatar
By Barnabybear
#27455
adamsdad wrote:The worst thing, it does not always recover even after powering off and on (it requires a dozen times).

Quite possable that your voltage regulator isn't reacting fastenough to the ESPs current demands. Try a 100uF close to the supply pins as the current draw can change from 20 to 250mA as soon as the WiFi transmits.
User avatar
By adamsdad
#27472
martinayotte wrote:Then, maybe your wiring ?
Do you have proper pullups on RES/CH_PD/GPIOI2/GPIO0 and pulldown on GPIO15 ?


Well, this might be a problem.
I have RESET, CH_PD directly connected to VCC (without resistor, should I use a resistor?)
In my last test I tried to use all GPIOs as outputs (all connected to LEDs).
Why are they called GPIO if they are required to be pulled up/down?
Requirements are contradictory in different sources (they are pretty specific for flashing but unclear for normal operation).
I would be grateful if you can provide clear instructions for stable configuration.

Besides that I could get only 4 GPIOs as outputs on ESP-12, others are always either high or low or in some intermediate state
User avatar
By martinayotte
#27495 Well, having RES/CH_PD directly to VCC is Ok, but that means you cannot add push button on RES for example.
For GPIO2/GPIO0, they needs PullUps for proper EXEC Boot mode, along with PullDown on GPIO15.
(see https://github.com/esp8266/esp8266-wiki ... ot-Process)
Code: Select allWhy are they called GPIO if they are required to be pulled up/down?

In those case, these pins can be used as GPIOs but AFTER the device has completed the boot process, for example, using GPIO2/GPIO0 as an I2C Bus, and since I2C also requires PullUp, it is a perfect fit. ;)
You can then easily connect a MCP23017 and get 16 additional GPIOs. :)
For other GPIOs, look at this page for multiple functions : http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations

As Barnabybear mentioned, a 100uF or higher (I'm using 470uF) across power supply as near as possible help getting ESP stable.
User avatar
By adamsdad
#27545 martinayotte thank you for links, they are really helpful

According to you (and others) these GPIOs affect boot process but should not affect stability of normal operation (however if a chip resets due to other reason they may affect its recovery)

According to some sources they have internal pull-ups, although in practice I see that boot is more predictive with external pull-ups.

Following your recommendations on pull-up/pull-down my blinking LEDs survived last night. That gives some hope for further development :)

However as I mentioned before I succeeded to use only 4 pins for output (namely GPIO5/4/0/2, all on the right side)
According to your link, some pins are multi-functional, so I added this to my code

PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, FUNC_GPIO12);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, FUNC_GPIO13);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, FUNC_GPIO14);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_GPIO15);

but it did not help.
Have you tried to use these pins for output?