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: 
Highlighted
Participant nturner
Participant
147 Views
Registered: ‎07-06-2018

Configuring I2C on Custom Platform

I'm trying to configure I2C for a custom platform, but am not getting any signals on either SDA or SCL when I connect them up to an oscilloscope.

I have the following constraints set:

 

# IIC
set_property -dict {PACKAGE_PIN AA11 IOSTANDARD LVCMOS25 PULLTYPE PULLUP} [get_ports iic_scl]
set_property -dict {PACKAGE_PIN AA12 IOSTANDARD LVCMOS25 PULLTYPE PULLUP} [get_ports iic_sda] 

And the following in my .tcl file:

 

 

...
create_bd_intf_port -mode Master -vlnv xilinx.com:interface:iic_rtl:1.0 iic_main
...
ad_ip_instance axi_iic axi_iic_main
...
ad_connect  iic_main       axi_iic_main/iic
...
ad_connect  sys_concat_intc/In14  axi_iic_main/iic2intc_irpt
...
ad_cpu_interconnect 0x41600000 axi_iic_main

 

My system_top.v:

 

module system_top (
...
  inout                   iic_scl,
  inout                   iic_sda,
...
  );

...

  system_wrapper i_system_wrapper (
...
    .iic_main_scl_io (iic_scl),
    .iic_main_sda_io (iic_sda),
...
    );

endmodule

Finally, my device tree:

 

amba_pl {
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                compatible = "simple-bus";
                ranges;
...
i2c@41600000 {
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
                        clock-names = "s_axi_aclk";
                        clocks = <0x1 0xf>;
                        compatible = "xlnx,xps-iic-2.00.a";
                        interrupt-names = "iic2intc_irpt";
                        interrupt-parent = <0x4>;
                        interrupts = <0x0 0x21 0x4>;
                        reg = <0x41600000 0x10000>;

                        eeprom@50 {
                                compatible = "at24,24c02";
                                reg = <0x50>;
                        };
                };
        };

Am I missing a setting somewhere for running I2C on any two arbitrary pins? I've already checked for any conflicts in the constraints and those pins are free.

 

Tags (4)
0 Kudos