cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
868 Views
Registered: ‎01-26-2020

ADV7511 configuration on ZedBoard

Jump to solution

Hello there

I am trying to display simple color pattern using the ZedBoard and I tried multiple tutorial but none of them works except for the one in the link bellow. I tried to edit the design to display color patterns I made but it doesn't work. The final goal here is to use the design to test different cameras and video stream.

Is there a simple way to configure the ADV7511 IC so that I can connect any video stream (from a camera, video player, etc.) to it and display it on a monitor?

All I need is a simple way to communicate with the IIC interface and configure the IC.

LINK : Zedboard HDMI Display Controller Tutorial for Vivado using Xilinx VIPP

http://www.zedboard.org/support/design/1521/11

I am using ZedBoard, vivado 2019.1, and SDK 2019.1

Thank You.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
745 Views
Registered: ‎11-09-2015

Hi @ashura12 

I wrote some blog articles as part of my Video Series. In 3 of them, I was creating a project on the ZC702 using the ADV7511:

Video Series 19: Using the On-Board HDMI on ZC702 (Vivado design)

Video Series 20: Starting with SDK and configuring the ADV7511

Video Series 21: TPG Application on ZC702

This should give you a solid base. Moving this to the Zedboard should not be too complicated.

I think one of the main difference is that on the Zedboard there is no switch on the IIC bus like on the ZC702. So this would be more removing some code.

Hope that helps

 


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

15 Replies
Highlighted
Moderator
Moderator
846 Views
Registered: ‎06-30-2019

Hi @ashura12 ,

 

You can use AXI IIC IP on PL side, and connect IIC bus to ADV7511 IC. Or use EMIO on PS side.

Configuration can be done in SDK with C code. 

-------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
Highlighted
Participant
Participant
835 Views
Registered: ‎01-26-2020

Hi @shengjie 

Thank you for your replay.

I used AXI IIC IP as described in the tutorial I mentioned above but there is no explanation for the C code used in the SDK and no explanation for the IPs used in the vivado design.

I know that in order to push the video stream to the monitor I need to tell the ADV7511 to do that through the IIC interface but how to do that? I have no Idea.

Is there any thing could help walk me through the whole process with explanations?

All I need is to tell the IC to stream what ever video connected to it.

0 Kudos
Highlighted
Moderator
Moderator
831 Views
Registered: ‎06-30-2019

Hi @ashura12 ,

 

For hardware design, connect IIC Bus to HD-SDA and HD-SCL which you can find in zedboard schematic.

For software design, you can use axi_iic example project or write your own iic driver. Here is an example:

void iic_write(u32 dev_addr, u32 reg_addr, u32 wdata){
	  Xil_Out32((AXI_IIC_BASEADDR + 0x100), 0x002); // reset tx fifo
	  Xil_Out32((AXI_IIC_BASEADDR + 0x100), 0x001); // enable iic
	  Xil_Out32((AXI_IIC_BASEADDR + 0x108), (0x100 | dev_addr)); // select
	  Xil_Out32((AXI_IIC_BASEADDR + 0x108), reg_addr); // address
	  Xil_Out32((AXI_IIC_BASEADDR + 0x108), (0x200 | wdata)); // data
	  while ((Xil_In32(AXI_IIC_BASEADDR + 0x104) & 0x80) == 0x00) {Delayms(1);}
	  Delayms(1);
}
u32 iic_read(u32 dev_addr, u32 reg_addr){
u32 rdata;
Xil_Out32((AXI_IIC_BASEADDR + 0x100), 0x002); // reset tx fifo
Xil_Out32((AXI_IIC_BASEADDR + 0x100), 0x001); // enable iic
Xil_Out32((AXI_IIC_BASEADDR + 0x108), (0x100 | dev_addr)); // select
Xil_Out32((AXI_IIC_BASEADDR + 0x108), reg_addr); // address
Xil_Out32((AXI_IIC_BASEADDR + 0x108), (0x101 | dev_addr)); // select
Xil_Out32((AXI_IIC_BASEADDR + 0x108), 0x201); // data
while ((Xil_In32(AXI_IIC_BASEADDR + 0x104) & 0x40) == 0x40) {Delayms(1);}
Delayms(10);
rdata = Xil_In32(AXI_IIC_BASEADDR + 0x10c) & 0xff;
Delayms(10);
return(rdata);
}

You can call these function like this:
iic_write(ADV7511, 0x41, 0x10);//ADV7511 = 0x72
iic_write(ADV7511, 0xD6, 0xC0);
......
-------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
Highlighted
Participant
Participant
823 Views
Registered: ‎01-26-2020

Hi @shengjie 

Thank you for your replay

For the PL side

I made the design in the picture bellow. what else do I need for the IIC interface.

asd.png

For the PS side

the functions in your replay will read from and write to the ADV7511 (or this is what I thought it is). Can I use it to configure the ADV7511 using the terminal command? like writing c code that ask for the register and write or read from it.

I know the process in theory but I found it difficult to implement it in real life without proper guide.

I apologist if my questions seems too obvious I got confused when I see many blocks and code files that I don't know what it use for.

0 Kudos
Highlighted
Moderator
Moderator
807 Views
Registered: ‎06-30-2019

Hi @ashura12 ,

 

PL side is OK.

The AXI IIC IP can communicate with PS with AXI-Lite Interface which is "S_AXI". PS can control this IP by writing/reading registers. Register space is declared in pg090.

You can learn more about IIC interface first, then it will be easier to read the C code in last post.  

As for PS side coding, Xil_Out32 or Xil_In32 indicates writing or reading registers. iic_read and iic_write are drivers for this IP. These functions can be called directly.

 

Maybe you can do some exercise with ug1165 Chapter 3

-------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
Highlighted
Participant
Participant
797 Views
Registered: ‎01-26-2020

Hi @shengjie 

I will try to implement a new design using what you post and my pattern generator and come back with the results later.

Thanks

0 Kudos
Highlighted
Moderator
Moderator
746 Views
Registered: ‎11-09-2015

Hi @ashura12 

I wrote some blog articles as part of my Video Series. In 3 of them, I was creating a project on the ZC702 using the ADV7511:

Video Series 19: Using the On-Board HDMI on ZC702 (Vivado design)

Video Series 20: Starting with SDK and configuring the ADV7511

Video Series 21: TPG Application on ZC702

This should give you a solid base. Moving this to the Zedboard should not be too complicated.

I think one of the main difference is that on the Zedboard there is no switch on the IIC bus like on the ZC702. So this would be more removing some code.

Hope that helps

 


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

Highlighted
Participant
Participant
700 Views
Registered: ‎01-26-2020

Hi @florentw 

I followed the instructions in your articles before and it didn't work. In the second article Tera Term didn't detect the monitor if it plugged in or not and always show it is connected. In the third article, It gives an error when running the project in XSCT command window. The error shown bellow. It gives a warning about the software version but then it says "no such file or directory xparameters_ps.h" so I am not sure if the problem in the software version or not.

Untitled.png

 

0 Kudos
Highlighted
Moderator
Moderator
693 Views
Registered: ‎11-09-2015

Hi @ashura12 

First that the Video Series will not be working in a straight forward manner on the Zedboard. You need to edit the code. If this is not working from the Video Series 20 there is no real point of moving to the 21.

If you cannot see that the monitor is disconnected this means that you are not reading into the ADV7511. As I mention, you will need to change the code to make it work.

For the issue with the Video Series 21, when did you download the files? I corrected this issue last week... the new files should be corrected. I am attaching it below for reference


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Moderator
Moderator
586 Views
Registered: ‎11-09-2015

Hi @ashura12 

Were you able to make any progress on this?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Participant
Participant
561 Views
Registered: ‎01-26-2020

Hi @florentw 

Unfortunately I couldn't. Most of the time the terminal wont show anything even hello word when I upload the vivado design to the ZedBoard or there is no response from the ADV chip when sending read only command.

I was busy with work lately so I didn't have enough time to work on it.I will follow up with the results if I manage to do something.

Thank you for your time.

0 Kudos
Highlighted
Participant
Participant
374 Views
Registered: ‎01-26-2020

Hi @florentw 

 

I made the necessary changes:

- Rebuild the PL side to make sure all IPs are compatible

- Added AXI IIC block 

- Modify the PS code for the Zedboard

 

Know I am facing a problem with the drivers. when executing XIicPs_MasterSendPolled the processor goes into an infinite loop and the program stops there. I search the internet but there is no solution and the problem appears to be in the IIC FIFO.

 

Any Ideas?

0 Kudos
Highlighted
Moderator
Moderator
366 Views
Registered: ‎11-09-2015

HI @ashura12 

You have added AXI IIC block (thus in the PL) but you are still using XIicPs_MasterSendPolled (thus of the PS). You need to make sure you are using the correct drivers


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Participant
Participant
334 Views
Registered: ‎01-26-2020

Hi @florentw 

 

I changed the code for the AXI IIC and it works as intended. Also, I used the I2C0 for the PS with the old code and it works great. I don't know how I miss this in the first place.

 

So for any one facing the same problem just connect the ADV7511 IIC interface with Zynq processor directly and do the necessary changes in the XDC file and in the SDK delete the code for the switch (set_iic_mux function) and it should work fine or at least it does for me.

 

Thank you so much for your help, I really appreciate it. Also, thank you @shengjie for the suggestions you give.

Highlighted
Moderator
Moderator
321 Views
Registered: ‎11-09-2015

HI @ashura12 

Glad to hear that you were able to make it work. Well done !


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos