I²C Slave - SCL stays low

05 Jul 2017

Hello everybody,

I need help for a I2C problem between a Raspberry Pi 3 and Nucleo F746ZG.

To validate my electronic prototype, I must be able to send continuously I2C requests from the RPI (master) with a python script to the Nucleo board (slave) without crash.

The RPI send the I2C Write requests, using SMBus, without delay between them (it's a fixed constraint). The Nucleo board wait a request to switch electromechanical relays. However, one relay require to be power supplied during 50 milliseconds (driven by the digital outputs) to switch correctly.

So, when starting to send I2C requests from RPI, SMBus raise "I/O Errors" (probably timeout) after the first request. Finally, after about 50 requests a fatal error is raised by SMBus : "IOError: [Errno 121] Remote I/O error" and we can observe with the oscilloscope than the scl channel is locked LOW and I can't restart the python script. If I reset the Nucleo board, the scl channel is unlocked and goes back to high level.

I don't know if the problem comes from my programming logic, the mbed framework or if it's physical.

What do you think about ?

Thank you. (I share the sources If there is activity in this topic).