ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-18T00:43:43+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=6916 2017-10-18T00:43:43+08:00 2017-10-18T00:43:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6916&p=16489#p16489 <![CDATA[Re: GPIO0 and GPIO2 flashing / gpio_init() mystery]]>
Nice to know that gpio_init() is not required. I guess this is one of the things that get copied from example to example to example without questioning its use. That always makes me suspicious. ;)

The 40 MHz signal, does it happen before the bootloader? Then a custom boot.bin would not help. What about GPIO2? Why is it flashing? And what are the initial states of the pins with the default boot.bin? Not input?

Statistics: Posted by blubb — Wed Oct 18, 2017 12:43 am


]]>
2017-10-17T23:20:20+08:00 2017-10-17T23:20:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6916&p=16488#p16488 <![CDATA[Re: GPIO0 and GPIO2 flashing / gpio_init() mystery]]> And you are getting the flashes because GPIO0 outputs 40 MHz clock signal when the ESP8266 is booting. So you may have a dimly lit LED on boot.
The initial state of GPIO after booting can be set by the bootloader or "boot.bin". You can request a custom boot.bin from Espressif technical support. :)

Statistics: Posted by Guest — Tue Oct 17, 2017 11:20 pm


]]>
2017-10-14T20:46:53+08:00 2017-10-14T20:46:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6916&p=16432#p16432 <![CDATA[GPIO0 and GPIO2 flashing / gpio_init() mystery]]>
for a project I am using the very simple ESP-01 modules. I use the UART for communication with another uC. This is all fine.

Now I still have two free pins: GPIO0 and GPIO2. I want to use them to display the current WiFi status. I know these pins have to be high during boot, so I wired two LEDs so that they are driven in active low:

3V3 ---> resistor ---> LED0 ---> GPIO0
3V3 ---> resistor ---> LED2 ---> GPIO2

Well, the ESP still boots fine and I can indeed use gpio_output_set() to signal the stuff I want.

However, I noticed that on every boot both LEDs flash for a short period when they should not. I can even remove all the pin related code and the flashing still happens. Why is that? I thought those pins are inputs with pullups enabled as long as the bootloader is active and they basically stay like this until I change that.

Also, my second question concerns the function gpio_init(). There are many examples which call gpio_init() in user_init(void). But there is no further explanation. It is not mentioned in the SDK manual either. What exactly is this functions purpose?

Statistics: Posted by blubb — Sat Oct 14, 2017 8:46 pm


]]>