I2C not working with some slaves.

I did a pretty comprehensive post over at adafruit forums.

Basically, the Zero's I2C stack is unable to communicate with some slave devices, but it works for others. Those same slave devices work with the Leonardo.

I used a logic analyzer and show the differences between the signals of the Leonardo and the Zero, reproduced here:

Does anyone have any suggestions? I've started poking around SERCOM.cpp but haven't made much headway.

Are you running the hourly build version of the SAMD core? Note that this is different to the IDE version. There have been a few I2C fixes recently.

See here: GitHub - arduino/ArduinoCore-samd: Arduino Core for SAMD21 CPU

Good point.

I've switched to the hourly build and the repeated start code is enough for this case.

I'll be updating with BNO055-specific issues later (I've just done a quick test and it's still not working).

Here is a trace:

I'm not sure why the SDA line is held low by the Zero, but not by the Leonardo in the first wait window.

Ok, I figured it out.

There was a slave address conflict; the Zero has an on-board i2c chip - the debug controller chip has i2c lines going in, and uses 0x28 (7-bit address), the same as the device I was using.

I've shifted my device's address and everything is now working.