This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TWI clock pull up

The data sheet recommends that both the TWI clock and data lines use pull ups and the GPIOs should be set to S0D1, essentially open collector drive. I can see the need for this on the data line, but if my I2C device does not do any clock stretching, is it safe to omit the pullup on the clock line and set the GPIO to S0S1?

I have tried this on my board and have seen no ill effects.

Parents
  • Hi everyone, about this question I have some perplexity too.

    If I set the pin as S0D1(like Ole suggest) the clock signal has a slow slope (as if it were filtered). If I set the pin as S0S1 the clock signal has a steep slope (like a step signal). I use the TWI0 with 10KOhm pull-up resistor, without internal pull-up, and pin drive as S0S1. So, the answer's Ole and datasheet say the truth, but for me the behaviour is better if I set the pin like S0S1 instead of S0D1 (like Aras said).

    What is the right way to take? Thanks.

Reply
  • Hi everyone, about this question I have some perplexity too.

    If I set the pin as S0D1(like Ole suggest) the clock signal has a slow slope (as if it were filtered). If I set the pin as S0S1 the clock signal has a steep slope (like a step signal). I use the TWI0 with 10KOhm pull-up resistor, without internal pull-up, and pin drive as S0S1. So, the answer's Ole and datasheet say the truth, but for me the behaviour is better if I set the pin like S0S1 instead of S0D1 (like Aras said).

    What is the right way to take? Thanks.

Children
No Data
Related