2023-04-04 01:23 PM
I have read the document RM0433 and AN4235, but the calculation is still a puzzle.
For example, if my
I2C frequency = 1MHz,
I2C clock source frequency = 170MHz,
AF=on, DF=off,
rise time = 80ns,
fail time = 10ns,
how do you get the SCLH = 0x10 and SCLL = 0x31?
Why is low period 3 times as long as high period?
I would like to use SCLH to increase the high clock period, as it is at the edge of the spec. It is not clear what parameter I shall change to increase SCLH.
Thanks.
Solved! Go to Solution.
2023-04-05 01:49 AM
Hello @SHU.1 and welcome to ST Community,
As mentioned in the AN4235, SCLH and SCLL values depend on the rise and fall time
with your values :
>>Why is low period 3 times as long as high period?
The duty cycle of the clock signal is SCLH / (SCLH + SCLL) = 16/(16+49) = 0.25
which means the clock will be high for 25% of the time and low for 75% of the time
Hope that helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-04-05 01:49 AM
Hello @SHU.1 and welcome to ST Community,
As mentioned in the AN4235, SCLH and SCLL values depend on the rise and fall time
with your values :
>>Why is low period 3 times as long as high period?
The duty cycle of the clock signal is SCLH / (SCLH + SCLL) = 16/(16+49) = 0.25
which means the clock will be high for 25% of the time and low for 75% of the time
Hope that helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.