Skip to main content
Graduate
June 26, 2024
Solved

i2c1 no pull-up

  • June 26, 2024
  • 1 reply
  • 1226 views

hello,my custom board using stm32mpa35faf7 i2c1, but I forget add externel pull-up resitors.

PD12--->I2C1_SCL

PE8 ---->I2C1_SDA

Now  ths i2c seems don't work.

please help me

    This topic has been closed for replies.
    Best answer by KnarfB

    drive-push-pull is wrong for I2C. It is always drive-open-drain

    hth

    KnarfB

    1 reply

    Super User
    June 26, 2024

    In general, this needs to be fixed by adding the missing pull-ups.

    Just for testing, it may work configuring the internal pull-ups on I2C1_SDA and I2C1_SCL in CubeMX GPIO Settings. The internal pull-ups are generally too weak, but better than nothing. 

    You may also increase the Rise Time in CubeMX and ideally watch the singnals on a scope. 

    And, surely you should use the slowest mode (standard mode). 

    hth

    KnarfB

    Graduate
    June 26, 2024

    guansonghuang_0-1719376557502.jpegguansonghuang_1-1719376585861.png

    I reconfig  the dts tree of i2c1,use inner pull-up and 1K baurate seems not work too

    KnarfBAnswer
    Super User
    June 26, 2024

    drive-push-pull is wrong for I2C. It is always drive-open-drain

    hth

    KnarfB