cancel
Showing results for 
Search instead for 
Did you mean: 

I2C weird behavior, SDA come high before SCL

NoNamed
Associate II

IMG_2641.jpeg

 I was implementing i2c on the stm32f4 to read the as5600 magnetic encoder. Everything ran perfectly for a while, then the I2C got stuck, I check and see that after the start generate, sda transition when the scl still low. I checked many times and the same thing happened every time.

5 REPLIES 5
AScha.3
Chief III

Where you see "wrong" signal?

For me it looks ok.

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

ah yes my bad, 

IMG_2641.jpeg

right after generated start, the sda somehow changed before the scl.

Ok, this looks ... like an error.  One clock pulse, then nothing...

1. What you doing there ? (command call ?)

2. Did you check for errors ? (state of I2S registers ?)

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

This is "start" only signal, is your code make I2C start without send package?

Maybe the delay too long, send package out your screen.

It seems your code generated a Stop and Re-start somehow.  It could be helpful to check status register to understand if something wrong, or read STOP/RESTART related statement in STM32F4 RM.