Skip to main content
Visitor II
December 12, 2024
Question

I2C initialization waveform issues

  • December 12, 2024
  • 2 replies
  • 1028 views

I use the arm chip stm32f401 to communicate with eeprom, and observe the waveforms of the clock and data lines. The rising and falling edges of the initial write and read waveforms are not square waves, but are slow and have some glitches. Later, when the read operation is repeated many times in while (1), the waveform gradually becomes better and becomes a square wave. Why?

    This topic has been closed for replies.

    2 replies

    Super User
    December 12, 2024

    In the first photo it looks almost like the line is slew-rate limited.

     

    I2C generally has slower rise times due to the open-drain nature of SDA/SCL. It is only driven low. When it rises, it is being pulled up by the external pullup resistor. There's a lot of ringing on the first signal but otherwise it looks fine. Your plots have equally fast rising/falling edges which suggests something is amiss, probably hardware related. Unlikely to be STM32 related.

     

    What EEPROM chip? It could be transitioning to fast-speed I2C due to a command which can cause the outputs to be push-pull rather than open-drain.

    Graduate II
    December 12, 2024

    What values are your pull-up resistors?