Post Go back to editing

adv7280 lock issue

Category: Datasheet/Specs
Product Number: ADV7280A

We have a custom board with an AD7280-m device with a raspberry cm4 and a custom yocto image. We have a PAL CVBS signal connected to the first input AIn1. The CVBS signal come from a a demodulated signal.

The attached video show how first decoding signal was ok (just a little bit darker) but after the signal was lost and come back again, the decoder try to lock on the signal but after a little bit of time it fall into free run mode... and come back again into lock signal, but very very darker.

I'm using the standard adv7180.c driver in mainline kernel.

Trying in fast switch mode (driver supported with v4l2-ctl -d 0 -c fast_switching=1) the results is the same, but the last "very very darker" decoding is not reached. The device still in free run mode.

The only thing "unlock" the adv7280 to this bad behavior is launching the undocumented command i2cset -y -f 1 0x21 0x0F 0x40 which set bit 6 (reserved). It seems that the decoder is restarted after this command.

The command used to stream is 

gst-launch-1.0 v4l2src norm=7 ! videoscale ! videoconvert ! fbdevsink

Tried to disable autodetect (i2cset -y -f 1 0x21 0x07 0x00) and set PAL format manually (i2cset -y -f 1 0x21 0x02 0x84) without success.

Tried to use fast switch mode using adi script ADV7280M_Cust-VER.4.1.txt ##CVBS FAST Switch## Fast Switch CVBS Single Ended In Ain 1, MIPI Out:
 

i2cset -y -f 1 0x21 0x0F 0x00 && echo "Exit Power Down Mode"
i2cset -y -f 1 0x21 0x00 0x00 && echo "INSEL = CVBS in on Ain 1"
i2cset -y -f 1 0x21 0x0E 0x80 && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x9C 0x00 && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x9C 0xFF && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "Enter User Sub Map"
i2cset -y -f 1 0x21 0x03 0x4E && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x04 0x57 && echo "Power-up INTRQ pin"
i2cset -y -f 1 0x21 0x13 0x00 && echo "Enable INTRQ output driver"
i2cset -y -f 1 0x21 0x17 0x41 && echo "select SH1"
i2cset -y -f 1 0x21 0x1D 0xC0 && echo "Tri-S LLC output driver"
i2cset -y -f 1 0x21 0x52 0xCD && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x80 0x51 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x81 0x51 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x82 0x68 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x0E 0x80 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0xD9 0x44 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x0E 0x40 && echo "Sel0xect User Sub Map 2"
i2cset -y -f 1 0x21 0xE0 0x01 && echo "Sel0xect 0xfast Switching Mo0xde"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "Sel0xect User Map"
i2cset -y -f 1 0x21 0xFE 0x88 && echo "Set CSI Map 0xAddress"
i2cset -y -f 1 0x44 0xDE 0x02 && echo "Power up D-Phy"
i2cset -y -f 1 0x44 0xD2 0xF7 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0xD8 0x65 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0xE0 0x09 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0x2C 0x00 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0x00 0x00 && echo "Power up CSI Tx"

It seems that there is some auto tools that goes into a bad state

Any suggestion? There's need more info?

  • Hi,

    Kindly note that, If you are not using a standard CVBS signal then it cannot be guaranteed that the ADV7280 will lock to it.
    Check that the FSC_lock bit (User Map register 0x10 bit[2]) is high. This bit indicates that the ADV7280 has locked correctly to the color subcarrier and it is more reliable indication that the ADV7280 has locked to a color burst.
    Let us know, Have you observe the same behavior for other Ain pin instead of Ain1?
    Ensure the input is locked using the status registers, by reading AD Result (0x10,0x12,0x13) Bits register.
    Note that, ADV7280-M will not lock to analog video instantaneously. In autodetect mode it can take up to 500ms and this has been discussed in 'AN-1337' paper. 
    Also, forcing the video format (using register 0x02) causes the ADV7280-M to lock to CVBS video more quickly.

    Thanks,

    Poornima

  • Thankyou for your comments Poornima.

    The CVBS signal is a standard CVBS signal from a CVBS PAL analog camera, but it reaches the decoder after a modulation and demodulation circuit, so it could have some amount of noise.

    Investigating fsc_lock bit and status register as you suggested, I see that when the signal is very dark, status register 0x10 reports 0x4e (PALB, peak white AGC mode active, FSC_LOCK and LOST_LOCK)

    Switching input from Ain1 to Ain2 (both connected to the same input) restart de decoder and status register 0x10 reports 0x4d (PALB, peak white AGC mode active, FSC_LOCK and IN_LOCK) and the video appears as aspected.

    When the things goes wrong (very dark picture) the status register 0x12 reports 0x10 (Nonstandard line length).

    The format is always forced setting register 0x02 to 0x84.

    Setting fast switch mode (0x0E -> 0x80, 0xD9 -> 0x44, 0x0E -> 0x40, 0xE0 -> 0x01) we get the attached video (the very dark image results in a freerun mode output / blue screen)

    Also in fast mode, switching from an input to a different input (some kind of internal autodetect reset) results in a video output as aspected.

    In the past we used adv7180 without issue and the incoming video signal was the same. Is the decoder of adv7180 equal to the decoder of adv7280?

  • Hi,

        Kindly note that, There are some drawbacks when using the fast switch script,

       1) Autodetection cannot be used. The video format must be manually programmed.

       2) In fast switch mode the ADV7180 is not robust to Macrovision (ROVI) signals.

      3) In fast switch mode the ADV7180 is not robust to poor and non-standard video sources So could you please send the CVBS signal directly to our decoder instead of passing that into modulation & demodulation circuit.

    As per expert comment, "Enabling fast switch mode involves approximately 4 extra I2C writes so it is not just dependant on the FL_ENABLE bit. Please see recommended scripts for more information.
    The fast switch script can only autodetect NTSC, NTSC4.43 and PAL-I. These are the 3 most popular CVBS standards. The number of autodetected scripts is reduced in order to speed up lock time.
    If you are going to use a CVBS standard other than NTSC, NTSC4.43 and PAL-I then I advise using our standard script".
    Thanks,
    Poornima.S
  • I understand your point, 

    however, fast switch mode was just a try. We do not need such speed to lock on input video signal.
    The real issue was that for some reason, sometime the device lock in a bad condition and the only things we can do to relock on the signal, is switch input or reset the decoder.
    Furthermore, I remember you that our case is adv7280. With previous used adv7180 all works as aspected.

  • Hi,

      ADV7180 & ADV7280 will come under same family, If this issue is not simulated in ADV7180 then it will not simulate in ADV7280 part.

     Please crosscheck your schematic with our reference one at 0676.ADV7280Schemaic.zip

     Also, Could you please evaluate the same in our evaluation board.

    Thanks,

    Poornima