Skip to content

I2C - random crash - Nano #6047

Closed
Closed
@kb-

Description

@kb-

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Architecture: SAMDApplies only to the SAMD microcontrollers (Zero, etc.)Library: WireThe Wire Arduino libraryType: DuplicateAnother item already exists for this topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions