I2C - random crash - Nano #6047
Labels
Architecture: SAMD
Applies only to the SAMD microcontrollers (Zero, etc.)
Library: Wire
The Wire Arduino library
Type: Duplicate
Another item already exists for this topic
I'm running I2C transfer tests on a multi master setup (2 Nano masters and one slave). test code
The tests consist in transferring data both ways between the masters and the slave at an average 10 ms interval. I added collision handling to my code and checked the bus signal with a logic analyzer to be sure it's not overcrowded.
Data is transmitted fine with with a few (1 per 100k) retries when collisions occur, but one of the masters ends up crashing after a random amount of transfers (70 000 on average). I added timeouts to every loop in my code and in Wire.cpp to avoid endless loops but the crashes still occur, I'm thinking of a bug hidden deeper in the Arduino code.
I don't think the problem is material related because setting a different Arduino as slave leads to a different master ending up crashing.
I don't notice crashes with transfers between one master and one slave (an overnight test with 3 million successful transfers, same code with 6 ms interval)
The text was updated successfully, but these errors were encountered: