Wire library - Slave hang #533
tetsudou
started this conversation in
Library discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
I have a rather weird bug going on in my I2C installation. I have several (8) ATTiny1604 slaves connected to an Arduino Nano master. Three of them run Code A and the rest run Code B (the difference is the peripheral it drives). What happens is that randomly, when the master is attempting to contact B-type slaves, one of these slaves would cut out after receiving the R/W bit and pull both SDA and SCL low as shown in the picture (yellow = SCL, purple = SDA). It would then proceed to completely hang, blocking the bus.
I am using external pull-ups (560 Ohm to ensure sharp edges).
If only A-type slaves are contacted (even with B-type slaves on the line), the code runs fine indefinitely (at least for a couple of hours). If at least one slave running Code B is contacted, it invariably eventually causes the line to cut out.
I have tried versions 2.3.2, 2.4.2 and 2.4.3 of the core. On the former two, the failure happens after some time (after 50-70 messages). On the latter, it always happens on the first or the second message.
What could be the reason for this behaviour?
Thanks in advance!
Code_A.ino:
Code_B.ino:
Beta Was this translation helpful? Give feedback.
All reactions