AnsweredAssumed Answered

ADV7182 and imx.6 : wrong autodetection result

Question asked by michael.t on Feb 9, 2016
Latest reply on Mar 11, 2016 by DominicB

Hello,

 

I'm trying to connect a single ended CVBS signal to a adv7182 on a imx6sl based custom board with Linux.

My problem is that the first time my video application starts, I'm only able to see interference lines. After the second or third application restart (without rebooting the board) the picture displayed is correct.


I did some research and it seems that the autodetect mode doesn't recognize the NTSC signal and thinks it's PAL :

The register at adress 0x10 gives 79 when I only see lines. When it works, it gives 13.

I tried to set VID_SEL to force NTSC without success. I also tried allow only NTSC detection with the register at 0x07 without noticing any changes.

 

On freerun mode, the application works flawlessly. This indicates that the problem is not the video stream between the imx6 and the adv7182.

The Linux driver I'm using is a modified driver for adv7180. The registers settings have been changed according to the datasheet. Here is the register setup :

 

  /*reset adv7180 */

    adv7180_write_reg(0x0f, 0x80);

    msleep(10);

    /* exit power down mode */

    adv7180_write_reg(0x0f, 0x00);

 

   

    /*VID_SEL : force NTSC  */

    int reg_tmp2 = adv7180_read(0x02);

    adv7180_write_reg(0x02, reg_tmp2 | (4<<4));

 

    /* autodetect only NTSC */

    int reg_tmp = adv7180_read(0x07);

    adv7180_write_reg(0x07, 2);

 

    /*Analog front end IBIAS settings */

    adv7180_write_reg(0x52, 0xCD); // input format Single Ended CVBS

    /* input select */

    adv7180_write_reg(0x00, 2);

 

    /* current clamp reset */

    adv7180_write_reg(0x0E, 0x80);

    adv7180_write_reg(0x9C, 0x00);

    adv7180_write_reg(0x9C, 0xFF);

    adv7180_write_reg(0x0E, 0x00);

   

    adv7180_write_reg(0x17, 0x41);

 

    /* power up digital output pads */

    adv7180_write_reg(0x03, 0x0C);

    adv7180_write_reg(0x04, 0x07);

    /*crystal for osc input */

    adv7180_write_reg(0x13, 0x0);   

    /* power up digital output pads */

    adv7180_write_reg(0x1D, 0x40);

 

How come this works but only after the second or third application restart ? After these restarts, it always works. The application I'm using is the overlay video test application provided by freescale.

 

Thank you in advance for your hints !

Outcomes