cancel
Showing results for 
Search instead for 
Did you mean: 

I2C initialization waveform issues

Yoshikitty3
Associate

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?

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
Karl Yamashita
Lead III

What values are your pull-up resistors?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.