cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
5,282 Views
Registered: ‎02-05-2015

Adjust I2C clock on iic0 interface

Hello,

I'm new in programmaing zynq and vivado and have a problem using i2c interface.

I use a example project in vivado including several interfaces, uart, i2c....

When I export the design to SDK and add the new application project Template Peripheral Test,

the serial iic clock is about 3 MHz.

 

The IicPsSelfTestExample(u16 DeviceId) returns sucessfull.

 

I use the function

XIicPs_MasterSendPolled()

for sending iic data.

 

Wher can I do the configuration for the iic interface (adjust the clock)?

I can't find the paramerters anwhere.

 

Thank you

geimel

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
5,273 Views
Registered: ‎07-01-2010

The I2C clock speed can be controlled by modifying the divisor_a and divisor_b values and these can be altered by writing into the I2C control register.

 

Zynq_I2C_clock.JPG

For more details please refer to the I2C controller and register details in the TRM.

http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

 

Hope this helps.

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
5,235 Views
Registered: ‎07-01-2010

Geimel,

Was the information in my last post help you understand the clock configuration?

Regards,
Achutha
---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos