cancel
Showing results for 
Search instead for 
Did you mean: 

"STM32" vs "STM32 Arduino" - I2C difference

JBond.1
Senior

Hi, I am trying to debug my code with logic analyzer and see why my code works on "STM32 Arduino", but does not work on "STM32".

Viewing at logic analyzer I see that "STM32 Arduino" much more consistent.

0693W000006GOctQAG.pngWhy could the message be different "0xD1 0x00" vs "0xE8 0x00"? Is it just logic analyzers bad measurement or does the sensor gets the same and behaves differently?

Any ways I could fix this difference?

5 REPLIES 5

Aren't these two entirely different types of transactions? Top one reads 0x00, bottom writes 0xE8,0x00

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

100% same transactions.

Its some kind of SCL issue? Or could it be just logic analyzer bad measurement?

Also on "STM32 Arduino" I was able to measure at 100MHz and transactions remain consistent. On "STM32" measuring at 100MHz gets even more "distortions", so I try to measure at ~400KHz which is 500KHz to get better results.

TDK
Guru

Also on "STM32 Arduino" I was able to measure at 100MHz and transactions remain consistent. On "STM32" measuring at 100MHz gets even more "distortions", so I try to measure at ~400KHz which is 500KHz to get better results.

You should measure at a rate significantly higher than the clock frequency. Not sure 400 kHz is going to cut it.

If measuring at 100 MHz shows the result is not as expected, fix the code, not the logic analyzer.

Probably a bug in the code.

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

You might want them to be, but they clearly aren't.

It is not a signalling issue,the protocol looks fine, you're calling the wrong library functions, or your code for the register read/write to your specific I2C slave decomposes that incorrectly.

You'd need to present the code that you're trying to implement, and cite the part.

Evidently staring at the LA plots isn't pointing you in the right direction.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
JBond.1
Senior

I think wires were to blame. I have shorten the wires a bit and now I get exectly the same even on 100MHz. Thanks!