I did a lot of googling and could not find my answer, nor a hint.
I have experience with the MCP23017, know about pull-ups, I2C and I am also using interrupt with MCP23017.
In short: can the MCP23017 output an interrupt and keep output pin states while the microcontroller is in deepsleep and there is no bus activity (no clock signal on SCL)?
In long:
Setup: ESP8266 as single I2C master, MCP23017 (configured to output interrupt on pin change on the desired pin)
Adafruit mcp23017 library
Mirroring active for intA and intB
Interrupt open drain (active LOW)
Pull-ups 1,8k for SCL and SDA
MCP23017 and ESP-12@ 3,3V
Interrupt works perfectly when ESP is running
Reset pin of MCP23017 is not left unconnected
All on a decent PCB that I designed, so no crappy connections
Now I successfully send the ESP-12 module (which I use here) to deepsleep.
What I want to do:
I want the MCP23017 to set interrupt just as normal but when there is no I2C bus activity (because ESP is sleeping).
What I tried after failing - besides googling and reading MCP datasheet 4 times:
call wire.endTransmission();
before sending the ESP to deepsleep, also added 1000ms delay between the commands
Intention of that: to free the bus, so that SDA/SCL are not held LOW in case that this could block the MCP23017 from setting its interrupt internally (would make no sense to me, but try-and-error before asking stupid questions)
Then I verified that Wire.endTransmission(true); behaves the same (without argument it defaults to true, while the argument „false“ should block the bus)
I cannot really accept to block the bus if that was necessary because i have to have very low standby current - but point out if that would work...
I suppose that MCP23017 goes to some sleep mode itself because of lacking bus activity, because if I drive a LED from another IO pin of the MCP23017, it also switches off shortly after the ESP enters deepsleep (within 1s).
I cannot find any documentation nor projects that tried that, so I am lost and hope for some input.
Sidenote: What I really intend to do is to wake up the ESP from deepsleep by the interrupt of MCP23017.
To achieve that I designed a pretty neat and cheap circuit (around 1€ In parts ) that does not need an attiny or any programming to reset the ESP, and that can have multiple different wakeup-sources that can be enabled or disabled seperately (like a SIM800L Module in my case), so that I could call the device and cause a wakeup, or even a reset during operation, but this can also be blocked. As second wakeup-source I need the MCP23017‘s interrupt pin.
Now that all relies on the idea that MCP23017 will keep its configuration while the microcontroller sleeps, but it does not seem to do so.
As I am controlling the reset pin of MCP23017 with D3/GPIO0 I should triple check that this pin does not output a short low pulse when entering deepsleep, but according to some other guy who measured pin behaviour (Deep sleep, reset & restart behaviour by pin - Everything ESP8266)
it does not drop below 1,8 V, and MCP23017 reset Pin should recognize LOW signal only below 0,5V when powered @3,3V.
Also D3/GPIO0 should have some weak pull-up in deepsleep, so that the pin is not floating.
Before I start deepdiving in pin behavior of ESP-12 I would like to know if it is generally possible to have an MCP23017 to interrupt and to keep output pin states while there is no I2C bus activity.