Using GPIO 0 as interrupt input (reset issue)
Posted: Tue Apr 11, 2017 4:36 am
Hi everyone,
I have looked through the topics and could not find a precise answer so I am posting my question as new topic, hope this is not redundant.
I am using ESP01 for a project that uses hall sensors. As a result I am using GPIO0 as input, that count the number of falling edges of the sensors thanks to interrupts. Everything works well until I need to reset the module: if unfortunately the hall sensor detects a magnet, it is LOW and I enter firmware-loading mode until I move the magnet away and reset it again.
As I need a second hall sensor I guess I will have the same problem with GPIO2.
I tried using pull-up resistors and diodes without results.
I was thinking about having a NMOS, but I am not sure it would work out.
I also read about the possibility of PCF8574 I2C module here http://www.esp8266.com/viewtopic.php?f=13&t=8370&hilit=GPIO0+as+an+input&start=4, but the Datasheet says nothing about GPIO0 as I2C interface pin. Moreover here http://www.esp8266.com/viewtopic.php?f=13&t=14120 it says that the I2C interface is only software emulated, so I am afraid of delay and inacurracy.
Would someone have a solution for using GPIO0 (and 2) as interrupt inputs without the reset problem?
Sincerely,
Valentin
I have looked through the topics and could not find a precise answer so I am posting my question as new topic, hope this is not redundant.
I am using ESP01 for a project that uses hall sensors. As a result I am using GPIO0 as input, that count the number of falling edges of the sensors thanks to interrupts. Everything works well until I need to reset the module: if unfortunately the hall sensor detects a magnet, it is LOW and I enter firmware-loading mode until I move the magnet away and reset it again.
As I need a second hall sensor I guess I will have the same problem with GPIO2.
I tried using pull-up resistors and diodes without results.
I was thinking about having a NMOS, but I am not sure it would work out.
I also read about the possibility of PCF8574 I2C module here http://www.esp8266.com/viewtopic.php?f=13&t=8370&hilit=GPIO0+as+an+input&start=4, but the Datasheet says nothing about GPIO0 as I2C interface pin. Moreover here http://www.esp8266.com/viewtopic.php?f=13&t=14120 it says that the I2C interface is only software emulated, so I am afraid of delay and inacurracy.
Would someone have a solution for using GPIO0 (and 2) as interrupt inputs without the reset problem?
Sincerely,
Valentin