This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TVP5158检测不到信号怎么办?

Other Parts Discussed in Thread: TVP5158

我现在8168检测不到TVP5158的信号,我这边显示打印信息,
CAPTURE ERROR: Could not detect video at tvp instace 0!!!
CAPTURE ERROR: Could not detect video at tvp instace 1!!!
CAPTURE ERROR: Could not detect video at tvp instace 2!!!
CAPTURE ERROR: Could not detect video at tvp instace 3!!!
读出来的DEVICE_TVP5158_REG_STATUS_1寄存器为0x10,DEVICE_TVP5158_REG_STATUS_2寄存器为0x18,但也会变,如下:
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 10 , regValue[1] = 8
regValue[0] = 7e , regValue[1] = 80
regValue[0] = 10 , regValue[1] = 38
regValue[0] = 10 , regValue[1] = 38
regValue[0] = 10 , regValue[1] = 38
regValue[0] = 10 , regValue[1] = 38
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 10 , regValue[1] = 18
regValue[0] = 7e , regValue[1] = a0
regValue[0] = 10 , regValue[1] = 38
regValue[0] = 10 , regValue[1] = 38

这样检测不到信号是什么原因?
  • 1.tvp5158是4通道decoder,首先你要选择正确的通道去读相应的状态。比如你想知道2通道的状态,你应该先写0x02到register 0xff,然后再读register 0x00,bit1,bit2都为1就应该锁住信号了。

    2,通过示波器确定你的输入信号已经进入TVP5158的输入pin脚,并且要看其是否正常。

  • 是否只接一路就能检测到视频信号,因为目前我只接了一路模拟摄像头。另外因为我们的板子只用了两片TVP5158,因而只用了VIP0的两个8位接口。

    我看到Device_tvp5158GetVideoStatus函数里是按照你讲的去获取TVP5158状态。如下:

    Int32 Device_tvp5158GetVideoStatus ( Device_Tvp5158Obj * pObj,
                                         VCAP_VIDEO_SOURCE_STATUS_PARAMS_S * pPrm,
                                         VCAP_VIDEO_SOURCE_CH_STATUS_S     * pStatus )
    {
        Int32 status = 0;
        Device_VideoDecoderCreateParams *pCreateArgs;
        UInt8 regAddr[8];
        UInt8 regValue[8];
        UInt8 numRegs;
        UInt32 devId, chId, std;

        if ( pStatus == NULL || pPrm == NULL )
            return -1;

        memset ( pStatus, 0, sizeof ( *pStatus ) );

        pCreateArgs = &pObj->createArgs;

        /*
         * Identify channel/core number and device number from channelNum
         */
        devId = pPrm->channelNum / DEVICE_TVP5158_CH_PER_DEVICE_MAX;
        chId = pPrm->channelNum % DEVICE_TVP5158_CH_PER_DEVICE_MAX;

        /* There can be at max 2 TVP5158 devices per port */
        if ( devId >= DEVICE_TVP5158_DEV_MAX )
            return -1;

        numRegs = 0;

        /*
         * select appropiate core
         */
        regAddr[numRegs] = DEVICE_TVP5158_REG_DEC_RD_EN;
        regValue[numRegs] = 1 << chId;
        numRegs++;

        status = OSA_i2cWrite8 (&gDevice_tvp5158CommonObj.i2cHandle, pCreateArgs->deviceI2cAddr[pObj->instId], regAddr, regValue, numRegs);

        if ( status < 0 )
            return -1;

        /*
         * read status
         */

        numRegs = 0;

        regAddr[numRegs] = DEVICE_TVP5158_REG_STATUS_1;
        regValue[numRegs] = 0;
        numRegs++;

        regAddr[numRegs] = DEVICE_TVP5158_REG_STATUS_2;
        regValue[numRegs] = 0;
        numRegs++;

        regAddr[numRegs] = DEVICE_TVP5158_REG_VID_STD_STATUS;
        regValue[numRegs] = 0;
        numRegs++;

        status = OSA_i2cRead8 (&gDevice_tvp5158CommonObj.i2cHandle, pCreateArgs->deviceI2cAddr[pObj->instId], regAddr, regValue, numRegs);

        if ( status < 0 )
            return -1;

        if ( ( regValue[0] & DEVICE_TVP5158_HSYNC_LOCKED )
             && ( regValue[0] & DEVICE_TVP5158_VSYNC_LOCKED )
             && ( regValue[1] & DEVICE_TVP5158_SIGNAL_DETECT )
            )
        {
                pStatus->isVideoDetect = TRUE;
        }

        if ( pStatus->isVideoDetect )
        {
            /*
             * since input to TVP5158 is always interlaced
             */
            pStatus->isInterlaced = TRUE;

            /*
             * 60Hz, i.e 16.667msec per field
             */
            pStatus->frameInterval = 16667;

            if ( ( regValue[0] & DEVICE_TVP5158_SIGNAL_60HZ ) )    /* is 50Hz or 60Hz ? */
            {
                /*
                 * 50Hz, i.e 20msec per field
                 */
                pStatus->frameInterval = 20000;
            }

            /*
             * frame width is always 720 pixels
             */
            pStatus->frameWidth = DEVICE_TVP5158_NTSC_PAL_WIDTH;
            pStatus->frameHeight = 0;

            std = ( regValue[2] & DEVICE_TVP5158_VID_STD_MASK );   /* video standard */

            if ( std == DEVICE_TVP5158_VID_STD_PAL_BDGHIN  /* PAL (B,D,G,H,I,N) */
                 || std == DEVICE_TVP5158_VID_STD_PAL_M    /* PAL (M) */
                 || std == DEVICE_TVP5158_VID_STD_PAL_COMB_N   /* PAL (Combination-N) */
                 || std == DEVICE_TVP5158_VID_STD_PAL_60   /* PAL 60  */
                 )
            {
                /*
                 * PAL standard
                 */
                pStatus->frameHeight = DEVICE_TVP5158_PAL_HEIGHT;
            }
            if ( std == DEVICE_TVP5158_VID_STD_NTSC_MJ /* NTSC (M,J) */
                 || std == DEVICE_TVP5158_VID_STD_NTSC_4_43    /* NTSC 4.43 */
                 )
            {
                /*
                 * NTSC standard
                 */
                pStatus->frameHeight = DEVICE_TVP5158_NTSC_HEIGHT;
            }
        }

        return status;
    }

     

     

    用示波器看信号有接进去,而TVP5158到DM8168也有数据输入。

  • 信号检测和后端没有任何关系,和输出也没有关系。如果只接一路,只有该路的core能锁住信号,也就是我让你在读之前,先要选择对应的core(register 0xFF)。

  • 从你之前的打印信息,第二片tvp5158的第一路锁住信号了,其它的没有。

  • 你从哪里看出第二片tvp5158的第一路锁住信号了,为什么还是会报“

    CAPTURE ERROR: Could not detect video at tvp instace 0!!!

    CAPTURE ERROR: Could not detect video at tvp instace 1!!!

    CAPTURE ERROR: Could not detect video at tvp instace 2!!!

    CAPTURE ERROR: Could not detect video at tvp instace 3!!!

    十分感谢你的答复

  • regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 10 , regValue[1] = 8

    regValue[0] = 7e , regValue[1] = 80

    regValue[0] = 10 , regValue[1] = 38

    regValue[0] = 10 , regValue[1] = 38

    regValue[0] = 10 , regValue[1] = 38

    regValue[0] = 10 , regValue[1] = 38

    regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 10 , regValue[1] = 18

    regValue[0] = 7e , regValue[1] = a0

    regValue[0] = 10 , regValue[1] = 38

    regValue[0] = 10 , regValue[1] = 38

     

     

    以上是你的打印信息,register 0x00是0x7e,表明就锁住信号了。

  • 可以提供tvp5158和dm8168连接的schematic?我现在正在做类似的

  • 附件是TVP5158的EVM原理图。关于和DM8168相连的原理图,你直接使用VOUT/VIN口即可。DM8168的参考原理图需要NDA,请找到你们相关的销售洽谈。

    TVP5158EVM Schematic.pdf
  • 谢谢您的回复:

    因为现在EVM板,公司还在流程中,所以没能得到更进一步的信息,再请教一个问题:

    DM8168只能接收YUV格式的数据,针对YUV格式的数据的摄像头的像素能达到多少?5M能达到吗,并且播放视频是1080P?

    • YUV是色度空间,与分辨率没有实际联系。

  • GET_CHIP_ID得到:0x58: 5158:0002:0302

    GET_VIDEO_STATUS得到:
     TVP5158: regValue[0]=10, regValue[1]=18, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=8, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=8, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=8, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=38, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=38, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=18, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=18, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=18, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=8, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=8, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=38, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=38, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=38, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
     TVP5158: regValue[0]=10, regValue[1]=28, regValue[2]=81, std=1
    CAPTURE ERROR: Could not detect video at tvp instace 0!!!

    按照您的说法,是一直没有锁定信号吗?请问什么情况会导致这样?


    后来试了下另一个instace,发现读到的chipId如下:
    I2C read8 chipId=65535, chipRevision=ff, firmwareVersion=ffff
    [rdk]  Vcap_configVideoDecoder/2567/0: 0x5c: ffff:00ff:ffff
     TVP5158: regValue[0]=ff, regValue[1]=ff, regValue[2]=ff, std=7

    这样也是检测到信号的,但保存出来的数据都是花的,请问什么情况会导致这个问题?是哪里配置错了吗?谢谢!