Skip to main content
Explorer
February 8, 2022
Solved

I2C read and write without stop condition

  • February 8, 2022
  • 13 replies
  • 6389 views

Using the HAL I2C library, is there any way to generate a continuous stream of scl and sda without a stop bit after the chip address acknowledge and data acknowledge. Otherwise I am planning to use a i2C bitbang library any recommendations? The target chip that I am using does not like the marked segment below

0693W00000JP0LZQA1.png

    This topic has been closed for replies.
    Best answer by Bob S

    Just saw your OTHER post about 1.1V I2C levels here https://community.st.com/s/question/0D53W00001M8LwmSAF/i2c-operating-voltages

    As mentioned in that thread, you need a level shifter. Also, your pull-up resistor value to the 1.1V supply is too large. The actual value depends on your clock speed and bus capacitance. The I2C spec (NXP UM10204) gives equations for this. Ignoring capacitance and allowing for the standard 3mA current when the line is pulled low, 367 ohms to 1.1V would be the highest usable value.

    13 replies

    Bob SAnswer
    Super User
    February 8, 2022

    Just saw your OTHER post about 1.1V I2C levels here https://community.st.com/s/question/0D53W00001M8LwmSAF/i2c-operating-voltages

    As mentioned in that thread, you need a level shifter. Also, your pull-up resistor value to the 1.1V supply is too large. The actual value depends on your clock speed and bus capacitance. The I2C spec (NXP UM10204) gives equations for this. Ignoring capacitance and allowing for the standard 3mA current when the line is pulled low, 367 ohms to 1.1V would be the highest usable value.

    Visitor II
    February 8, 2022

    useful notes:

    • A single message can contain multiple START conditions. The use of this is so-called “repeated START�? is common in I2C.
    • STOP condition always denotes the end of the transmission even if it is issued in the middle of the transaction or the middle of a byte.

    VThan.2Author
    Explorer
    February 23, 2022

    Hello all,

    Thank you for the replies and I finally got some updates and was finally able to get back to this. I agree with everyone that the problem was with the level translation. I was able to resolve it. I ended up using a PCA9517 level converter. Worked very well. I also reduced the clock rate to 20kHz and since I was going through bread boards and hook up wires. My outputs were much cleaner. Thank you everyone.

    0693W00000KaJzUQAV.png0693W00000KaK0rQAF.png