DUE I2C issues after time

Cross-posting an issue I reported to Adafruit about getting a 10-DoF working with a DUE.

I recently have been attempting to hook up a 10-DoF from Adafruit with my DUE. I managed to follow all of their tutorials and got everything up and working, however it doesn't stay working for long.

In particular, the 10-DoF communicates over the I2C protocol. I can get everything working and see data, but after some period of time, calls to Wire.EndTransmission() start returning error codes (or Wire.RequestFrom returns a size less than expected). It is unclear what triggers it to start failing. I've tried wiggling the boards, leaving them alone, using both Wire and Wire1 (with and without pullup resistors), and using both the 3.3v and 5v inputs to the 10-DoF. After the error starts, no further data can be read on the I2C lines until power is reset to the 10-DoF and the DUE is reset.

It seems like something is happening to cause the communication to get out-of-sync and it's unable to recover.

I had thought it was an issue with the 10-DoF, but finally got my hands on a MEGA 2560, on which my exact same code runs flawlessly.

I'm not sure if there's a problem with the Wire library for the DUE (SAM hardware) or if it's just a defective board. Any thoughts / troubleshooting tips would be much appreciated.

I had a hard time to establish com link over I2C between due & audio codec, than due & dds synthesizer. Same issue like you described it, working for a while, than for no reason it's hung up. My conclusion was, after digging up and down library and all associated registers, there is an internal bug in atmel's chip. Probably, due SAM3X8 wrongly interprets multi-master I2C on a bus, when there is only one device as a slave. I ended up writing software emulator of the I2C protocol on 20&21 digital pins, luckily com link was unidirectional, due->codec.

Interesting. I've been looking for a software I2C library for DUE for a bit myself. I found and am now using I2C-Master-Library for my Mega2560, and was considering taking a stab at porting it over to the DUE, but I think it still ultimately depends on the hardware TWI, so I imagine it'd still have an issue.

Any chance the software library you use is open sourced / online somewhere?

It was not a library, just simple logic automat to drive pin via direct-port manipulation. There is software I2C for UNO, but DUE version isn't written yet, AFAIK.