cancel
Showing results for 
Search instead for 
Did you mean: 

i2c internal pull up

Ara.1
Senior

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 ?

7 REPLIES 7
taraben
Senior

Hi @ARa.1​ 

we had hard time not using external pull-ups.

If you try to look up for exact resistance in the datasheet then you do not find information.

I assume the "pullup" is implemented as current sink.

I recommend you to use external pullup resistor 2kOhm.

HTH, Adib.

--

darla14
Senior

hello, did it work?

Did what work? Using the internal pull-ups is unlikely to be satisfactory/reliable.

Tack on 2K7 pull-up resistors to some accessible points for the SDA and SCL signals.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal III

For on-board low connection with capacitve load, internal pull up may work work in many case.

taraben
Senior

Hello Uwe,

may and should are not sufficient when things are REQUIRED.

The "pull up" is a current source and thus not guaranteed to have a specific resistance.

There is no confirmed information in the datasheet about that.

If you really depend on I2C you must add external pull up resistors.

HTH, Adib.

--

Ozone
Lead

With STM32 parts, internal pull-ups hardly ever worked for I2C.

They are about one order of magnitude to large (high impedance).

I don't expect it any different for the MP.

Hi,

just to clarify, pull-up and pull-down values are stated in datasheet (e.g. DS12505), please look at "I/O static characteristics" table.

Value if 40kOhm typical (between 25K and 50K).

I confirm that the internal pull-up is too large for usual I2C (with 50K/30pF load, you might barely reach 100KHz).

I agree, the I2C recommended pull-up is not in STM32 datasheet, but useful and complete information on Rp could be found in I2C standard.

As stated, rule of thumb using 2.7K pull-ups work fine.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.