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

i2c internal pull up

  • September 11, 2020
  • 5 replies
  • 8044 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.

5 replies

taraben
Associate III
September 11, 2020

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.

--

PatrickF
Technical Moderator
March 12, 2021

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.NEW ! Sidekick STM32 AI agent, see here
darla14
Associate III
March 7, 2021

hello, did it work?

Tesla DeLorean
Guru
March 7, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Chief
March 7, 2021

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

taraben
Associate III
March 8, 2021

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
Principal
March 8, 2021

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.