Wire library - dataline is released a bit too early

Hi!
I'm working on a project where I'm controlling an Analog Devices DSP (ADAU1701). communication works fine, but I discovered a potential issue when I hooked up my scope to monitor the i2c lines.

The DSP (7-bit i2c address 0x34) is a little bit too slow to pull the data line down on request, and can be seen as a positive pulse on the data line with about 700ns duration. I'm communicating at 400kHz, but these spikes still appears at 100kHz. I'm quite sure it's the DSP thats causing the spikes, because they're gone when comunicating with an external EEPROM on the same bus.

Obviously I want to get rid of this, so my first thought was to add some kind of delay (typically a microsecond). I tried to change the wait parameter that gets passed to twi_writeTo() through endTransmission(), but no luck. Does anyone knows how to get rid of this?

Thanks!

As this spike is far away from a rising edge of the SCL signal it must be ignored by all bus devices anyway. It's not because your DSP is to slow but it's to fast. It releases the SDA signal exactly at the falling edge of the SCL signal (after the ACK) and the Arduino isn't ready yet to pull it down for the next transfer.

OK, I see. The DSPs behavior is correct, it's just the MCU that isn't ready. Like you already mentioned; it's "far" away from the rising edge, so no device would catch it anyways. Thanks for the clear up :slight_smile: