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: 
Adventurer
Adventurer
418 Views
Registered: ‎04-22-2015

I2C through EMIO

Jump to solution

Hello,

I'm trying to use I2C1 through EMIO with Zynq UltraScale+, but something is wrong and I can't see anything change through ILA or external scope.

Using Vivado 2019.1 I configure this in the PS block

Screenshot_20190614_173135.png

Then in the debug setup I add the 6 emio signals:

Screenshot_20190614_173347.png

Then from Linux I try a simple 'i2cdetect -r 1' but the ILA and external scope don't show any changed signals. I2C0 is working fine through MIO 10&11 through the same i2cdetect test (with I2C0 working this should eliminated clock or Linux driver issues).

I've exported the Hardware and then built fsbl and pmufw in the SDK before building a new boot.bin file.

In the TRM I see where the rouing is described in Figure 22-1:

i2c_emio.png

But I don't actually see how the routing is controlled. What does control the routing? Is this through registers that I can query? Or something else I can check?

Any help would be greatly appreciated.

thanks,

Paul

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
380 Views
Registered: ‎04-22-2015

Re: I2C through EMIO

Jump to solution

As would be expected this turned out to be something very simple. For I2C not only is the SDA bi-directional but SCL is also, but I had not set up the return path for SCL. So the controller was always waiting to see the SCL line high before starting anything and that's why both SDA and SCL showed no activity even on the ILA.

In the vhdl wrapper for the block design just the second line below was the fix:

<SCL I/O pin name> <= I2C1_scl_out when (I2C1_scl_tristate = '0') else 'Z';
I2C1_scl_in <= <SCL I/O pin name>; -- <- This was the missing vhdl line that I needed to add in the wrapper vhdl file
<SDA I/O pin name> <= I2C1_sda_out when (I2C1_sda_tristate = '0') else 'Z';
I2C1_sda_in <= <SDA I/O pin name>;

Also for the MIO routing it's clear this is done through the IOU_SLCR registers, then for the EMIO I guess the EMIOI2C1* signals are always there and just used when needed?

thanks,

Paul

View solution in original post

0 Kudos
1 Reply
Adventurer
Adventurer
381 Views
Registered: ‎04-22-2015

Re: I2C through EMIO

Jump to solution

As would be expected this turned out to be something very simple. For I2C not only is the SDA bi-directional but SCL is also, but I had not set up the return path for SCL. So the controller was always waiting to see the SCL line high before starting anything and that's why both SDA and SCL showed no activity even on the ILA.

In the vhdl wrapper for the block design just the second line below was the fix:

<SCL I/O pin name> <= I2C1_scl_out when (I2C1_scl_tristate = '0') else 'Z';
I2C1_scl_in <= <SCL I/O pin name>; -- <- This was the missing vhdl line that I needed to add in the wrapper vhdl file
<SDA I/O pin name> <= I2C1_sda_out when (I2C1_sda_tristate = '0') else 'Z';
I2C1_sda_in <= <SDA I/O pin name>;

Also for the MIO routing it's clear this is done through the IOU_SLCR registers, then for the EMIO I guess the EMIOI2C1* signals are always there and just used when needed?

thanks,

Paul

View solution in original post

0 Kudos