AnsweredAssumed Answered

ADV7513 problems with power up

Question asked by meneerbeer on Apr 5, 2015
Latest reply on May 29, 2015 by GuenterL

I have made a custom board with an ADV7513 and a Cyclone IV FPGA. The FPGA creates the video input. Furthermore it runs a soft core for which I wrote an I2C module to set up the ADV7513.


The problem I am running into is kind of weird, there are multiple things to it. When I first assembled my board and flashed the FPGA with the first version of the firmware it of course would not give an image, so that meant there was some debugging to do. I measured the I2C lines with a logic analyzer and I was getting acknowledgements from the ADV7513. Good! There is a sign of life from the ADV7513. In order to be able to analyze the I2C I put an infinite loop around the I2C init writes (so the soft core was sending over and over power up, video input mode settings, video output mode settings etc.).


After I confirmed that I2C was working I started measuring some other signals with my scope: vsync, hsync, DE and HPD. When I tried to measure HPD I accidentally shorted it with the 1.8 V pin next to it and suddenly an image popped up on my screen. At this point you would say that HPD is routed incorrectly. However, when I measure the pin I measure 3.4 V, which should be enough for the ADV to confirm there is a TV connected.


So now I was finally able to get an image on the screen by shorting HPD to 1.8 V for a short time. At this point I was constantly writing the registers (power up, input, output mode etc.). I noticed that my display was kind of black and white and sometimes there would be some color when there was a color transition. I figured, perhaps something is going wrong when I try to setup the registers constantly. So at this point I would just send a power up to start, then write the other registers and then I would have an infinite loop in which I send the power up command. Now when I short the HPD pin, I would actually get a color image and everything was right.


At this point I figured that something had to be wrong with the HPD or something, so I set 0xD6[7:6] to 11, meaning HPD is always high. Now the ADV7513 will actually power up and give an image without me having to short the HPD pin. I am getting the black and white screen again however.


I am sending a 640x480 (25 MHz pixel clock) to the ADV7513. I am using RGB 4:4:4, 24 pins. I am not using audio at the moment, so I am just using the DVI mode.


My register writes are as follows:

/* power up */   

  i2c_send(0x39, 0x41, 0x10);


    /* fixed registers */

    i2c_send(0x39, 0x98, 0x03);

    i2c_send(0x39, 0x9A, 0xE0);

    i2c_send(0x39, 0x9C, 0x30);

    i2c_send(0x39, 0x9D, 0x61);

    i2c_send(0x39, 0xA2, 0xA4);

    i2c_send(0x39, 0xA3, 0xA4);

    i2c_send(0x39, 0xE0, 0xD0);

    i2c_send(0x39, 0xF9, 0x00);


    /* video input setup */

    i2c_send(0x39, 0x15, 0x17); // Video Format ID = 24 bit RGB 4:4:4 - [7:4] i2c sample freq = do not use

    i2c_send(0x39, 0x16, 0x00); // Output format = 4:4:4 - Color Depth = invalid - Input Style = Not Valid - DDR input edge = falling edge - output color space black img = RGB

    i2c_send(0x39, 0x17, 0x00); //Vsync polarity = pass through - Hsync polarity = pass through - Interpolation style = zero order - Aspect ratio = 4x3 - Disable DE Generator


    /* video output setup */   

    i2c_send(0x39, 0x18, 0x46); // Disable CSC - rest default value

    i2c_send(0x39, 0xAF, 0x14); // HDCP Disabled - Current Frame HDCP Encrypted - DVI Mode


So right now as a hack I have to put a while loop with the power up command after the initialization code listed above. And then I need to short the HPD pin to 1.8 V (I just tap the pins with tweezers and I do not need to keep the pins connected). Adding the HPD always high register setting before the power up will make the output black and white. The chip will power up without having to short HPD however.


Hopefully the problem is clear. I really have no clue what to look at anymore. One thing I did forget was connect the +5V pin on the HDMI connector. I thought the receiver was supposed to supply 5V but it turns out to be the source. I do not think this is the problem however, as the HPD pin is 3.4 V when the cable is connected and the TV is on.


Oh, I have assembled two boards, both same problem.