AnsweredAssumed Answered

Problem with I2C and TIM1

Question asked by karolina on May 18, 2015
Hello!

I have downloaded Cube for stm32f091 and have some problems with I2C_TwoBoards_Com example.

The problem is frequency of I2C clock. In example is said that System Clock is 48MHz. And with macro 
#define I2C_TIMING      0x00A51314
I2C clock is set to reach 1MHz speed. Bus as you can see in picture, it's not the case. Frequency is 500kHz. 
Could you tell me how to calculate constant to reach frequency 1MHz? 
Few days ago I tried to work with timer example, and there was also a problem with main clock. I guess the frequency is not set to 48MHz but some other. Did anyone had similar problem? How did you solve it?

http://www.deviantpics.com/image/LSy

Also the look of the signal is not rect, I guess the frequency is too high :/. Are my assumptions ok?

Thank you!

Attachments

Outcomes