I2C reset (part of protocol or by device/manufacturer only?)
![Zoot](https://forums.parallax.com/uploads/userpics/559/nW4UO23UEIWZ4.png)
I have had a only a bare handful of projects where under certain circumstances an I2C slave may "lockup" (generally by not releasing SCL if a lockup happens during clock stretching -- masters that do not timeout under these circumstances usually fall into their own endless loop as well because SCL never goes high). There are workarounds of course: polling SCL, bit-banging I2C routines to ensure that I2C transactions timeout while waiting for a slave to release a line, power cycling the slave, etc.
However, I came across this tidbit in a datasheet from Atmel (an I2C 32kbit SOIC EEPROM) and was wondering if this is part of the I2C protocol proper, or just a (widely-used?) convention followed by some manufacturers but not necessarily all.
Anybody know about this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
However, I came across this tidbit in a datasheet from Atmel (an I2C 32kbit SOIC EEPROM) and was wondering if this is part of the I2C protocol proper, or just a (widely-used?) convention followed by some manufacturers but not necessarily all.
doc said...
After an interruption in protocol, power loss or system reset, any 2-
wire part can be reset by following these steps:
(a) Clock up to 9 cycles, (b) look for SDA high in each cycle while SCL is high and then
(c) create a start condition as SDA is high.
Anybody know about this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Comments
So·a·START condition is basically the same thing as a reset. I don't see anywhere in the spec that says 9 clock cycles need to precede that. Maybe it's a workaround for some I2C devices with bugs in the silicon that prevents a proper reset after receipt of a START condition.
You don't HAVE to send all 9 clocks, after each clock you are just looking for SDA to go high.
If SDA doesn't go high after 9 clocks, then something is really screwed up.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php