User avatar
By martinayotte
#27549 Good !
So, you have a more stable setup now.
For the additional GPIOs, be careful, some of the one you've tried to used are dedicated to the Flash connection, so, there can't be use easily as GPIOs.
If it is only to get additional GPIOs, why not using a I2C GPIO expander like I suggested above ?
MCP23017 give 16 GPIOs.
User avatar
By adamsdad
#27563
martinayotte wrote:Good !
If it is only to get additional GPIOs, why not using a I2C GPIO expander like I suggested above ?
MCP23017 give 16 GPIOs.


IO expander is a good alternative besides 2 issues:
1. I'm currently in research stage and want to understand what maximum I can get from the module. It looks a bit strange to get only 4 outputs from the chip with declared 9 GPIOs. Actually they are 2, since GPIO0 and GPIO2 are required to be pulled up.
2. adding $2 port expander chip to $2 WIFI chip of about the same physical dimensions looks a bit out of proportion and requires PCB to mount them, while I was thinking about connecting relay board, PIR sensor and reed switches directly to the module (probably not all at the same time)

So my question remains open: have you had a success with those pins?
User avatar
By martinayotte
#27565
adamsdad wrote:So my question remains open: have you had a success with those pins?

As I've said, I'm using GPIO2/GPIO0 as I2C bus, but as long as your external requirement can tolerate to be PullUp at startup, then they are considered as normal GPIOs. If you don't need to used the Serial TX/RX, those can be switched to GPIOs too. For GPIO15, it is the reverse, since it is pulled down. I didn't myself try to use it as GPIO, but I don't see any reason why it won't work. for GPIO12/GPIO13/GPIO14/GPIO16, I'm using them as SPI for an SdCard, but here again they can be used as GPIOs (personally, I've tested awhile ago an LED on GPIO16)
User avatar
By adamsdad
#27705 It seems that I'm walking around the same problem. Although blinking led project became pretty stable thanks to pulling specific pins, normal project is still unstable and even does not recover even after reset.
The whole story in reverse order:
Last setup I was trying was a ESP-12 working in AP mode (that seems to me more stable than client mode). It contains 2 parts: blinking led on timer (GPIO4), UDP listener setting outputs to values received in request and sending back response with ports status. + PC connected to ESP's network with application sending UDP packets to ESP every second and toggling GPIO5. In the beginning everything was working good. PC connects to WIFI, all leds are blinking, everything recovers on manual reset. The first crash appeared after about 30 min. PC cannot connect to WIFI. I see in ESP logs that client attaches to the network, but PC does not complete connection process. I reset ESP manually and everything recovered and worked pretty fine for a number of hours. Meanwhile I tried to disconnect and reconnect PC, everything worked fine. I left it blinking overnight. In the morning: I see a number of crashes, timer led is blinking but network one does not. When I reset ESP manually it crashes just after network initialization, every time differently but result is the same: timer led is working, PC cannot connect to network. Nothing helps. The only solution I've previously learned is to re-flash erasing network configuration.
The previous test was about the same just ESP was connected to home network in client mode, the same result was reached in a few minutes. The only solution to recover it was re-flashing and erasing network configuration (writing blanks to areas that seem to store network configuration).
I'm pretty sure that
1. it's not about pulling pins issue, since this time I did according to your suggestions and timer blink work fine
2. Not my software issue, my code is minimalistic (I even removed network configuration code, since ESP remembers its configuration). And running stable for few hours (while receiving and responding every second)
3. It seems that over time the chip enters to some state that it cannot recover from. It may be overheating (although the chip itself is cold) or probably firmware problem.

Any clues?