I2C Clock Speed
Posted: Tue Mar 29, 2022 4:31 pm
I'm running into problems using I2c with a STEM 125-14. The i2c board I'm trying to use has a clock speed limit of 100KHz.
I've searched in the forums, and found a thread that directed to the XILINX docs that explain the Clock Divisor relationship to CPU1x_clock. I also looked at Appendix B, but I can't make heads or tails of it.
Can someone point me to the function that would be used to set the I2C Clock divisor, along with the constant names for the appropriate registers? Also, if someone could tell me what CPU1x_Clock is on that model board, that would be helpful.
Also, the xilinx docs are inconsistent. In one area, it says the effective clock is cpu_clock/((divisor_a+1)*(divisor_b+1)). In another, it says it's: cpu_clock/(22*(divisor_a+1)*(divisor_b+1))
which would be correct?
I've searched in the forums, and found a thread that directed to the XILINX docs that explain the Clock Divisor relationship to CPU1x_clock. I also looked at Appendix B, but I can't make heads or tails of it.
Can someone point me to the function that would be used to set the I2C Clock divisor, along with the constant names for the appropriate registers? Also, if someone could tell me what CPU1x_Clock is on that model board, that would be helpful.
Also, the xilinx docs are inconsistent. In one area, it says the effective clock is cpu_clock/((divisor_a+1)*(divisor_b+1)). In another, it says it's: cpu_clock/(22*(divisor_a+1)*(divisor_b+1))
which would be correct?