FiPy I2C clock stretching

  • (sysname='FiPy', nodename='FiPy', release='1.20.0.rc8', version='v1.9.4-7b83c6d on 2019-03-06', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1')

    I can use the FiPy to communicate over I2C at full speed to simple register based devices.
    I have an issue when communicating with a more complex device, as I2C errors are seen when communicating at anything but a snail's pace!

    I believe (the manufacturer has yet to confirm) that the device may implement I2C clock stretching and thus cause bus issues if the host does not also support stretching.

    Can PyCom clarify if the FiPy supports slave devices that implement I2C clock stretching?

  • @iwahdan, the external I2C device now works on I2C bus 2 when using an extended timeout period.

    Thanks for solving the problem.

  • @dave_stones , Then is it possible you rebuild the Firmware modifying the timeout to 20ms , and see if that fixes the issue? you should be using UART ID=2

  • I have been informed by the OEM that "Clock stretching should not take more than 20 ms."

  • I still haven't received a suitable response from the OEM, but I'll update you when I do...

  • Hello @dave_stones , pycom devices have 3 i2c peripherals , 2 hardware and 1 software(bit bang peripheral ID:2) , the software i2c driver supports clock stretching with timeout of 10ms , currently the timeout is not configurable via micropython. here.

    What is the maximum stretch the your slave device can do?

Log in to reply

Pycom on Twitter