FIRST-Tech-Challenge / SkyStone

FTC SDK
https://www.firstinspires.org/robotics/ftc/what-is-first-tech-challenge
275 stars 1.04k forks source link

What are the possible causes for I2C_TIMEOUT_UNKNOWN_CAUSE? #212

Open Windwoes opened 4 years ago

Windwoes commented 4 years ago

I was working on my auto the other day, and ran into one of the newly added NACK error codes in SDK v5.4 I2C_TIMEOUT_UNKNOWN_CAUSE during a run.

While the message speaks for itself that the Lynx doesn't know why the timeout occurred, what are some possible causes for this? My wiring all appears to be in good order, and when the fault occurred, the robot wasn't touching anything metal that could have induced ESD or EMI.

Lunerwalker2 commented 4 years ago

Knowing nothing about much of this technical stuff, I would say maybe check the i2c sensors themselves? Just in case it is external.

Windwoes commented 4 years ago

I've seen it happen randomly on 2 different sensors, which were on different REV Hubs. If I could catch the bus activity on a logic analyzer that would certainly yield some helpful info but strapping a logic analyzer to your robot and managing an 8FT USB cable while the robot does auto would be..... fun... especially considering this only seems to happen exceedingly rarely...