2024-12-11 07:15 PM
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?
2024-12-12 11:39 AM
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.
2024-12-12 12:07 PM
What values are your pull-up resistors?