UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer sridevi123
Observer
110 Views
Registered: ‎02-20-2015

ZYNQ PS I2C ISSUE

Hi

I am working on ZYNQ Custom Board 7045. Currently I am trying to test PS I2C1(Connected to MIO32, 33) which is connected to RTC DS3231M. The Code is stuck in XIicPs_MasterSendPolled. I am not able to test further.

And CLK_FREQ its taking 50MHz. But as per TRM it should take CPU_1x clock which is 133MHz.

Can u please guide me what is the correct approach.

I have attached my code along with this mail.

 

Thanks and Regards

Sridevi

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
35 Views
Registered: ‎07-12-2018

Re: ZYNQ PS I2C ISSUE

@sridevi123,

I2C SCL Clock = CPU_1X_Clock / (22 * (divisor_a + 1) * (divisor_b + 1)).

Could you check the clock in Vivado once?

Did you make any changes in the polled example?

 

Best Regards
Abhinay PS
------------------------------------------------------------------------------------------------------------------------------
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
Observer sridevi123
Observer
16 Views
Registered: ‎02-20-2015

Re: ZYNQ PS I2C ISSUE

Hi

I have attached xparameters.h file.  In that I am seeing I2C clock 50MHz.  It should have been 133 MHz.  I have not changed polled example. And In vivado I do not have any option to change I2C clock. I have attached my Vivado settings. Please let me know what is the issue.

/******************************************************************/

/* Definitions for driver IICPS */
#define XPAR_XIICPS_NUM_INSTANCES 1

/* Definitions for peripheral PS7_I2C_1 */
#define XPAR_PS7_I2C_1_DEVICE_ID 0
#define XPAR_PS7_I2C_1_BASEADDR 0xE0005000
#define XPAR_PS7_I2C_1_HIGHADDR 0xE0005FFF
#define XPAR_PS7_I2C_1_I2C_CLK_FREQ_HZ 50000000


/******************************************************************/

/* Canonical definitions for peripheral PS7_I2C_1 */
#define XPAR_XIICPS_0_DEVICE_ID XPAR_PS7_I2C_1_DEVICE_ID
#define XPAR_XIICPS_0_BASEADDR 0xE0005000
#define XPAR_XIICPS_0_HIGHADDR 0xE0005FFF
#define XPAR_XIICPS_0_I2C_CLK_FREQ_HZ 50000000


/******************************************************************/

 

Regards

Sridevi

0 Kudos