cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 I2C pins has slow rise up

FAndr.5
Associate III

Hello, I have this problem with the I2C channel of the STM32F103C8T6 (original), the SDA and SCL signal have very steep rise times, and the slave devices do not recognize the commands. In the image you can see that the SDA has more than 1.5us rise when it should be in the 100ns range, and the same happens with the SCL. The design has 4K7 pull-up resistors, although I also tried 2K2, 3K3, 10K, and the result is similar or worse. I did a test with 470 resistors, and the signal is better but it is not a correct value for i2c. (The image is only the STM32F103 and the resistors, it does not have the lead connected, to rule out problems with it.)

1 ACCEPTED SOLUTION

Accepted Solutions
FAndr.5
Associate III

Sorry, my mistake, it's not an electrical problem, although the bus doesn't look good, it works. The problem was in the way to access the device, it had an extra byte in the frame and it blocked the slave. do not detect it until it shares the STM32F103 bus rail by rail with the other micro that does communicate with the device, and see that it does not match the length of a specific command when initializing the device. A thousand apologies again, and thank you very much for all your attention.

View solution in original post

7 REPLIES 7
AScha.3
Chief III

so there is a high cap loading on the pin...look and find the cap.

and if scope using, always (!) 10:1 setting on probe. (otherwise THIS is the big cap.)

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

I have 60Mhz tips, their capacitance shouldn't be a problem against a 100khz signal and a 4k7 pull-up, what's more, the fault hasn't changed and I got to measure with the oscilloscope because I2C didn't respond. With these same leads I measure the I2C channel of an ATSAMD21 against the same slave device with the same pull-up resistors, and it's almost a push-pull waveform.

 

TDK
Guru

There's capacitance on the line. What board is this? Does it happen to other pins as well? Does it happen on known good ST designed boards?

Let's be objective here--unlikely to be an issue with the decade-old STM32F103C8T6 chip design which has been used by millions of different people. Could be a problem with *your* chip, if it's been misused or abused or otherwise damaged.

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

I suppose that your scope trace corresponds to 4k7 pullup. Initial slew rate is about dU=2V per dt=400ns. Average pullup current is about I=(3.3V-1V)/4k7=0.5mA. So capacity on bus is about C=I/dU*dt = 100pF. Typical low cost 60MHz scope probe in 1:1 configuration is 100pF... suspicious coincidence. Perform measurment with 1:10 configurations. Send screen shots with 10k and 1k pullups. Send detailed board photo. Search in schematics.

Thank, a think is a worng config bus....

 

the code

FAndr.5
Associate III

Sorry, my mistake, it's not an electrical problem, although the bus doesn't look good, it works. The problem was in the way to access the device, it had an extra byte in the frame and it blocked the slave. do not detect it until it shares the STM32F103 bus rail by rail with the other micro that does communicate with the device, and see that it does not match the length of a specific command when initializing the device. A thousand apologies again, and thank you very much for all your attention.