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
12,244 Views
Registered: ‎09-30-2011

Zynq I2C via EMIO on standalone

This should be easy but I am doing something incredibly dumb - I just don't know what dumb thing I am doing. And so I need help.  I have a MicroZed board (XC7Z020) with a breakout carrier card. I have a design that consists of the Zynq Processor System and the PS I2C (I2C0) driving EMIO. I assign those two I2C signals to two pins on the carrier card (CON1 pin3 and pin5) driven by R19 and T11 on the Zynq. The pin is defined to have a PULLUP as well as actually having a physical pull-up on the carrier board. When I download the bitstream and run some code to exercise I2C0, the code initializes OK and SelfTest passes but when I run signals through the actual I2C clock and data pins, I see nothing!

 

I think I need some property set or some compile option enabled. I mean this shouldn't be hard. It's got to be something I screwed up.  I double checked the pin assignments and the connector pins and they match up. Any ideas? Help me. Please.

0 Kudos
10 Replies
Teacher muzaffer
Teacher
12,236 Views
Registered: ‎03-31-2012

Re: Zynq I2C via EMIO on standalone

first thing to check is to put an ila to your bitstream and see if the emio signals are getting to your fpga logic ie if they are getting to ps/pl interface. if yes, the issue is with pl, if not somehow ps emio muxing is not being done correctly.

 

what os/driver are you using to program ps i2c controller registers? you can read the emio config registers and see if the i2c signals are being configured correctly.

- 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
12,231 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

I am using a 'standalone' 'bare metal' (i.e., no OS)

0 Kudos
12,229 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

And the I2C registers appear to be correctly configured and accept values as expected.  I will try an ILA core

0 Kudos
12,181 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

I futzed around a bit and found that Bank 1 had its voltage set to 3.3V instead of 1.8V but when I corrected that it didn't make things a lot better it still worked only erratically.

 

What seemed to make the system work repeatedly was always doing a 'reset entire system' rather than 'reset processor' when running through the SDK. That sounds like it is symptomatic of something. The problem is that I don't what it might be symptomatic of.  Any ideas?

0 Kudos
Teacher muzaffer
Teacher
12,179 Views
Registered: ‎03-31-2012

Re: Zynq I2C via EMIO on standalone

can you observe i2c signals on the fpga pins? If yes, do they actually look like the i2c transactions you need?

One potentially problematic issue is that your bank is configured to 1.8V. What is the IO voltage of the i2c device you are trying to talk to? Is it 3.3V or 1.8V ?
- 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
12,171 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

I see the I2C transactions as expected but only when I do an "entire system reset". The I2C device is a 3.3V device and the I2C pins are defined as LVCMOS 3.3V

0 Kudos
Teacher muzaffer
Teacher
12,166 Views
Registered: ‎03-31-2012

Re: Zynq I2C via EMIO on standalone

So are the pullups for sda, sck to 3.3V ? If so, you are slowly damaging these IOs. It is unadvisable to connect a 1.8V IO to a 3.3V signal.

I reallly have no clue about "entire system reset"

- 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
12,161 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

Sorry for the confusion that I perceive you are in. I am obviously not being clear. The I2C signals themselves are coming out of Bank 34 and that bank is set to 3.3V as are the assigned pins (R19 and T11). These pins (R19 and T11) are also pulled externally to 3.3V. So I *think* the IOs themselves should be OK. I could be wrong but I don;t think I am mixing up voltage levels.

0 Kudos
9,500 Views
Registered: ‎09-30-2011

Re: Zynq I2C via EMIO on standalone

It turns out, the 'reset entire system' requirement is symptomatic of running on a device that is already loading a bitstream from a PROM. This was not immediately obvious because (a) the board was being reused and was delivered with the PROM pre-programmed by the previous user and (b) the DONE LED was not functional.

 

Sigh.

 

Thanks for the help.

 

0 Kudos
Teacher muzaffer
Teacher
6,478 Views
Registered: ‎03-31-2012

Re: Zynq I2C via EMIO on standalone

If your case is resolved please close it by selecting a post as answer if you have one.
- 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