Chat freely about anything...

User avatar
By Yaro
#27609 Hi all,

I've looked on web and didn't find anything usefull to explain ESP8266 GPIO_0 and GPIO_2 uses. Can someone explain me better?

Also, since ESP8266 use UART communication and no GPIOs as I can see on applications. How it's possible to have notifications for incoming RX trasmission? For example WIFI modules have a GPIO int. pin that advise host MCU about incoming data, how this works on ESP8266, there is something similar or should I always monitor UART incoming data?
User avatar
By martinayotte
#27616 GPIO15/GPIO2/GPIO0 are used to indicate MCU which mode to boot :

https://github.com/esp8266/esp8266-wiki ... ot-Process

But after the boot process is finish, it can be use as normal GPIOs.

For UART, what is your question exactly ? because there are status register to figure out if character has come in from RX. There are possibilities to handle that thru interrupts.
User avatar
By martinayotte
#27628 Leaving pin floating is not a good practice, there were some debates on that.
In general, a good practice is to use external pullups to avoid any ESD triggering the pins.
Many people faced unwanted reset on ESP because they didn't add pullups on RES pin, same thing can be apply to other pins.

For GPIO interrupts, on ArduinoESP, they are initialized with attachInterrupt(MyPin, interrupt_callback, CHANGE), where CHANGE is on both edges, it can be also FALLING or RISING.
For the plain SDK, it is done using gpio_pin_intr_state_set() and gpio_intr_handler_register(), but I don't have much details since I'm using ArduinoESP regularly.
I've found that thread, maybe it can help : viewtopic.php?f=9&t=4033&start=5