Left here for archival purposes.

User avatar
By epsoc
#10119 And just as a general note: Even most or all GPIOs of the ESP have internal pull-ups, those pull-ups are only active at the earliest after the chip is fully powered up. If the pin is used for a startup function (defined state at reset or power-up) and in particular if that pin is evaluated very early on (e.g. by hardware) you should pull it externally to a defined state. And GPIO2 apparently has some startup function, intentionally (maybe for QA/testing) or unintentionally.
User avatar
By GeoNomad
#10155
epsoc wrote:And just as a general note: Even most or all GPIOs of the ESP have internal pull-ups, those pull-ups are only active at the earliest after the chip is fully powered up. If the pin is used for a startup function (defined state at reset or power-up) and in particular if that pin is evaluated very early on (e.g. by hardware) you should pull it externally to a defined state. And GPIO2 apparently has some startup function, intentionally (maybe for QA/testing) or unintentionally.


Definitely.

Looking at the Espressif reference schematic, they leave GPIO2 not connected. But another note refers to the strapping page: UOTXD,MTDO,GPIO0,GPIO2 might affect the boot­mode. So it is documented...

Makes me wonder if there is a register that can set a "permanent" pullup on that pin, like some of the others.

24 hours in, I have 2 ESP-01s running on 60 seconds sleep/wake cycles with no disruption. Looks like pulling up GPIO2 nailed it. One has 10K, the other has 4.7K (which is actually the reference requirement of the DS18B20 - I had assumed it was in the sealed unit I was using - it wasn't :oops: ). When I think about it, the 2 meter cable attached to the DS18B20 on GPIO2 would make a good antenna for noise. I am surprised it was as stable as it was without the pullup.

Here is the strapping page:

U0TXD Strapping to chip_test_mode 1: normal mode; 0: chip_test_mode

MTDO Strapping to STRAPPING_GPIO2 for SW boot_sel [2]
GPIO0 Strapping to STRAPPING_GPIO1 for SW boot_sel [1]
GPIO2 Strapping to STRAPPING_GPIO0 for SW boot_sel [0]

SD_DATA3 Strapping to STRAPPING_GPIO[15] for SW sdio_boot_sel [2]
SD_DATA2 Strapping to STRAPPING_GPIO[14] for SW sdio_boot_sel [1]
SD_DATA0 Strapping to STRAPPING_GPIO[13] for SW sdio_boot_sel [0]

Boot_sel SD_sel != 3'b010 SD_sel == 3'b010
7 SDIO HighSpeed V2 IO Uart1 Booting
6 SDIO LowSpeed V1 IO Uart1 Booting
5 SDIO HighSpeed V1 IO Uart1 Booting
4 SDIO LowSpeed V2 IO Uart1 Booting
3 FLASH BOOT
2 Jump Boot
1 UART Boot
0 Remapping


GPIO0 after reset, the default is function5 to export the clock
GPIO2 U0TXD signal can be output through GPIO2 pad besides U0TXD pad
User avatar
By alonewolfx2
#10209 i wonder one thing. if zombie mode coming with gpio2 state, how i can use modified at21 example without any zombie mode?
Attachments
scc.PNG
scc.PNG (6.76 KiB) Viewed 2891 times