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.

DM6437 DSPBIOS VGA display problem

Other Parts Discussed in Thread: TMS320DM6437, TVP5146

HI:

I am using a TMS320DM6437 EVM board(DEC6437), which is produced by Arrow-SEED. I want to capture the video input data and display the input video signal on a monitor with VGA interface.
Since the VPBE device driver(vpbe_bios_drv.lib) does not include VGA display mode, I modify the file DDC_vpbeVenc.C as follows:
case PSP_VPBE_DISPLAY_525P_PROGRESSIVE_COMPONENT:
{
    LLC_setDisplayStartPosition(vpbeDeviceHandleCVMP->osd[0].OsdRegs,
                    0x78u,0x26u);
     
    // VPBE_VENC_RGBCTL     = 0x00;
    LLC_ResetVencReg(vencHandleCVMP->VencRegs);

    // VPBE_VENC_ARGBX0     = 1024;
    // VPBE_VENC_ARGBX1     = 1404;
    // VPBE_VENC_ARGBX2     = 345;
    // VPBE_VENC_ARGBX3     = 715;
    // VPBE_VENC_ARGBX4     = 1774;
    LLC_ResetArgbxReg(vencHandleCVMP->VencRegs);

    // VPBE_VENC_VMOD        = 0x00002103;
    // 0x02
    LLC_setDigVideoOutputRGB666_18BIT(vencHandleCVMP->VencRegs);
    // 0x01
    //LLC_setVencItlcl_262NTSC_312PAL(vencHandleCVMP->VencRegs);
    //LLC_setVencNonStandardProgressiveMode(vencHandleCVMP->VencRegs);
    LLC_setVideoOutputHDTVMode(vencHandleCVMP->VencRegs);
    // 0x00
    LLC_setVideoOutputTYP_525p_HDTV(vencHandleCVMP->VencRegs);
    LLC_setMasterMode(vencHandleCVMP->VencRegs);
    LLC_setVideoTimingNTSCPAL(vencHandleCVMP->VencRegs);
    // 0x03
    LLC_setEnableBlankMode(vencHandleCVMP->VencRegs);
    //LLC_setEnableCompositeOutput(vencHandleCVMP->VencRegs);
    //LLC_setVencEnable(vencHandleCVMP->VencRegs);

    // VPBE_VENC_VIOCTL     = 0x00002000; VIDCTL
    LLC_setYCOutputDir(vencHandleCVMP->VencRegs);
    //LLC_setVLCKEnable(vencHandleCVMP->VencRegs);
    LLC_setEnableVCLKOutputEnable(vencHandleCVMP->VencRegs);
    LLC_setEnableVCLKPinOutputEn(vencHandleCVMP->VencRegs);

    // VPBE_VENC_VDPRO      = 0x00000870;
    // 0x08
    LLC_setVencFrefilterFreqOne(vencHandleCVMP->VencRegs);
    LLC_setVencColorbarType75(vencHandleCVMP->VencRegs);
    LLC_setVencColorbarNormal(vencHandleCVMP->VencRegs);
    //ColorBar
    //LLC_setVencColorbarType100(vencHandleCVMP->VencRegs);
    //LLC_setVencColorbarOutput(vencHandleCVMP->VencRegs);
    // 0x07
    LLC_setVencAtRgbOn(vencHandleCVMP->VencRegs);
    LLC_setVencAtYccOn(vencHandleCVMP->VencRegs);
    LLC_setVencAtComOn(vencHandleCVMP->VencRegs);
    // 0x00
    LLC_setVencDacFreq27MHz(vencHandleCVMP->VencRegs);
    //LLC_setVencDacFreq54MHz(vencHandleCVMP->VencRegs);
    LLC_setVencDaupsOff(vencHandleCVMP->VencRegs);
    //LLC_setVencDaupsOn(vencHandleCVMP->VencRegs);
    LLC_setVencCupsOff(vencHandleCVMP->VencRegs);
    LLC_setVencYupsOff(vencHandleCVMP->VencRegs);

    // VPBE_VENC_OSDCLK0    = 0x0;
    LLC_setOSDClockControl0(vencHandleCVMP->VencRegs,0u);
    // VPBE_VENC_OSDCLK1    = 0x1;
    LLC_setOSDClockControl1(vencHandleCVMP->VencRegs,1u);

    // Enable DAC A, B and C
    // VPBE_VENC_DACTST     = 0x00000000;
        LLC_setDacANormalMode(vencHandleCVMP->VencRegs);
        LLC_setDacBNormalMode(vencHandleCVMP->VencRegs);
        LLC_setDacCNormalMode(vencHandleCVMP->VencRegs);

    // VPBE_VENC_CMPNT        = 0x00008000;
    LLC_setRGBModeForComponentOutput(vencHandleCVMP->VencRegs);
    //20141123
    //LLC_setRGBModeMSYROn(vencHandleCVMP->VencRegs);
    //LLC_setRGBModeMSYBOn(vencHandleCVMP->VencRegs);
    //LLC_setRGBModeMSYGOn(vencHandleCVMP->VencRegs);
    LLC_setRGBModeMSYGOff(vencHandleCVMP->VencRegs);
    //LLC_setSyncBuildUpTime100US(vencHandleCVMP->VencRegs);
    //LLC_setBlankBuildUpTime150US(vencHandleCVMP->VencRegs);

    // VPBE_VENC_DACSEL     = 0x00000435;
    LLC_setDacAOutVidFormatCompPr(vencHandleCVMP->VencRegs);
    LLC_setDacBOutVidFormatCompY(vencHandleCVMP->VencRegs);
    LLC_setDacCOutVidFormatCompPb(vencHandleCVMP->VencRegs)
                
    // VPBE_VENC_SYNCCTL    = 0x00000003;
    LLC_setVencVDOutputEnable(vencHandleCVMP->VencRegs);
    LLC_setVencHDOutputEnable(vencHandleCVMP->VencRegs);
                
    // VPBE_VENC_HSTART        = 0x0;
    //LLC_setVencHorzStartPixel(vencHandleCVMP->VencRegs, 0);
    // VPBE_VENC_HVALID     = 0x0;
    //LLC_setVencHorzValidData(vencHandleCVMP->VencRegs, 0);
    // VPBE_VENC_VSTART        = 0x0;
    //LLC_setVencVertStartPixel(vencHandleCVMP->VencRegs, 0);
    // VPBE_VENC_VVALID     = 0x0;
    //LLC_setVencVertValidData(vencHandleCVMP->VencRegs, 0);

    LLC_setEnableCompositeOutput(vencHandleCVMP->VencRegs);
}
break;
Then build the project, and crete a new vpbe_bios_drv.lib.

I use the new VPBE device driver in the loopback project, and modifiy the OSD config parameters and  VENC config parameters such as:
static PSP_VPFECcdcConfigParams ccdcParams =
{
    //FVID_CCDC_YCBCR_8,                  /* dataFlow     */
    FVID_VI_BT656_8BIT,
    //FVID_BAYER_PATTERN,
    FVID_FRAME_MODE,                    /* ffMode       */
    480, // 576,                        /* height       */
    720, // 720,                        /* width        */
    (720 *2), //(720 *2),               /* pitch        */
    0,                                  /* horzStartPix */
    0,                                  /* vertStartPix */
    NULL,                               /* appCallback  */
    {
        PSP_VPFE_TVP5146_Open,         /* extVD Fxn    */
        PSP_VPFE_TVP5146_Close,
        PSP_VPFE_TVP5146_Control,
    },
    0                                   /*segId         */
};

static PSP_VPBEOsdConfigParams  vid0Params =
{
    //FVID_FRAME_MODE,                    /* ffmode       */
    FVID_FIELD_MODE,
    FVID_BPP_BITS16,                    /* bitsPerPixel */
    FVID_YCbCr422_INTERLEAVED,          /* colorFormat  */
    (720 * (16/8u)),                     /* pitch        */
    0,                                  /* leftMargin   */
    0,                                  /* topMargin    */
    720,                                 /* width        */
    480,                                 /* height       */
    0,                                  /* segId        */
    PSP_VPBE_ZOOM_IDENTITY,             /* hScaling     */
    PSP_VPBE_ZOOM_IDENTITY,             /* vScaling     */
    //PSP_VPBE_ZOOM_2X,
    PSP_VPBE_EXP_IDENTITY,              /* hExpansion   */
    //PSP_VPBE_EXP_NINE_BY_EIGHT,
        PSP_VPBE_EXP_IDENTITY,              /* vExpansion   */
    NULL                               /* appCallback  */
};

static PSP_VPBEVencConfigParams vencParams =
{
    // PSP_VPBE_DISPLAY_NTSC_INTERLACED_COMPOSITE     
    // PSP_VPBE_DISPLAY_PAL_INTERLACED_COMPOSITE
    PSP_VPBE_DISPLAY_525P_PROGRESSIVE_COMPONENT
};

Rebuild the project, and debug it with breakpoints.

.......

VPSS_DBG("VPSS  :VPSS Loopback Started \r\n");

FVID_allocBuffer(CcdcHandle, &FBAddr);
for(num_frame = 0; num_frame < NumOfIterations; num_frame++)
{

    CcdcallocFB[num_frame % NO_OF_BUFFERS] = FBAddr; //Breakpioint 1
    if(IOM_COMPLETED != FVID_exchange(CcdcHandle,&FBAddr))
    {
        VPSS_DBG("VPSS  :CCDC Exchange.......FAILED \r\n");
    }
    //Histogram(FBAddr->frame.iFrm.y1);

    VidallocFB[num_frame % NO_OF_BUFFERS] = FBAddr; //Breakpioint 2
    if(IOM_COMPLETED != FVID_exchange(Vid0Handle,&FBAddr))
    {
        VPSS_DBG("VPSS  :Video -0 Exchange.......FAILED \r\n");
    }

}
......
The trace window shows the message "VPSS  :Video -0 Exchange.......FAILED", and the displayed image is shown bellow:


There are two questions:
1. The Image was splited in two half from both sides, how can I setup the OSD and VENC parameters to solve the problem?
2. FVID_exchange(Vid0Handle,&FBAddr) did not execute normally, why? How can I do?

When using NTSC_INTERLACED_COMPOSIT mode, the captured data was displayed on the monitor with composite interface correctly. That means the function

"FVID_exchange(Vid0Handle,&FBAddr)" is ok.
When I modify the VPBE_VENC_VDPRO register, the monitor can display ColorBar image on VGA monitor. that is to say VENC paramters are right, right?

When the VPBE works in FVID_FRAME_MODE, the displayed image is as follows:

Thank you for your consideration.

  • Could anyone give me some suggestions?

    Thanks!

  • I have solved the problem!

    There is another file "ddc_vpbe.c" , which should be modified accordingly.

                ...........................

                case PSP_VPBE_DISPLAY_YCC16_DIGITAL_480P:
                case PSP_VPBE_DISPLAY_525P_PROGRESSIVE_COMPONENT:           //2014-11-25
                {
                    DDC_VPBEUpdateFreeQueue(PSP_VPBE_VIDEO_0);
                    DDC_VPBEUpdateFreeQueue(PSP_VPBE_VIDEO_1);
                    DDC_VPBEUpdateFreeQueue(PSP_VPBE_OSD_0);
                    DDC_VPBEUpdateFreeQueue(PSP_VPBE_OSD_1);
                    DDC_VPBEUpdateFbAdress(PSP_VPBE_VIDEO_0);
                    DDC_VPBEUpdateFbAdress(PSP_VPBE_VIDEO_1);
                    DDC_VPBEUpdateFbAdress(PSP_VPBE_OSD_0);
                    DDC_VPBEUpdateFbAdress(PSP_VPBE_OSD_1);
                }
                break;

                .................

  • Thanks for your update and solution on the same.