Skip to main content
Ara.1
Associate III
September 11, 2020
Question

i2c lines internal pull up i2c sda and sclk lines

  • September 11, 2020
  • 3 replies
  • 1472 views

hi

i am using stm32mp157caa3, there is a i2c slave operating at 3v3, while design, we have not connected( "forget")pull up line on i2c clk and data line,

so i tried enabling open-drain internal pull up in dtsi , but i2cdetect is not able to find the slave device

dtsi :

            pins {

               pinmux = <STM32_PINMUX('H', 11, AF5)>, /* I2C1_SCL */

                  <STM32_PINMUX('B', 9, AF4)>; /* I2C1_SDA */

               bias-pull-up;

               drive-open-drain;

               slew-rate = <1>;

            };

let me if my configuration and understanding is right ?

This topic has been closed for replies.

3 replies

TDK
Super User
September 11, 2020

The internal pullup is ~50kOhm whereas the I2C bus needs ~4.7kOhm. It may work, but I would want to check the signal edges on a scope. You can also try lowering the speed.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
September 11, 2020

4K7 is still quite high,depend on the capacitive loading, I'd lean more to 2K7 on a 3V bus. Definitely look at the rise time you're seeing on the bus, especially at the far end if the trace/wires are long. Watch grounding and current return paths.

Recently had someone run into issue on the Arduino DUE which used 1K5, which looked to be attributable to the current on the OD transistor.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Ara.1
Ara.1Author
Associate III
September 14, 2020

i made clock rate 100k hz still, i2c query fails,

with pin setting as both clk, data lines as a open drain - pull up pin configuration

Ara.1
Ara.1Author
Associate III
September 11, 2020

Thanks, please confirm your observation, that would be helpful for validation, Mean while i will check lowering the speed and let you know.

slave is sgtl5000

but is my dtsi configuration dtsi file for internal pull up is correct ?

TDK
Super User
September 11, 2020

> please confirm your observation

What I'm saying is if it were my project, that's what I would be checking. That's what I'm suggesting you do.

I just realized this is not for an MCU but for an MPU (despite the tag), which I am considerably less familiar with. I still think the internal pullup is the issue.

"If you feel a post has answered your question, please click ""Accept as Solution""."