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.

DM648 Video Display Port External Sync Operation Problem

In video display port raw data display mode, the display port should be sync to external controlled HSYNC, VSYNC and FVID signals. In my application, I used an FPGA connected with DSP video port. The FPGA will provide the HSYNC, VSYNC and FVID signals to DSP video port. However I checked the video port signals using an oscilloscope, I found that the HSYNC/VSYNC/FVID could not affect the video port timing, the video port will output pixel data just according to the timing restricted in the video display related registers.

In order to check this problem, I fixed the HSYNC = 0 and VSYNC = 0, the video port outputs pixel data according to video display timing registers; even if I fixed the HSYNC = 1 and VSYNC = 1, the video port still outputs pixel data accordingly.

It seems that the external sync signals could not control the pace of the output pixel data. The following is my display port configuration parameter definition in PSP driver style:

 

#define HDIM_DIS_RAW_16BIT {                                                           \

    VPORT_MODE_RAW_16BIT,               /* dmode:3          */          \

    VPORT_FLDOP_PROGRESSIVE,            /* fldOp:3          */          \

                                                                        \

    VPORT_SCALING_DISABLE,              /* scale:1          */          \

    VPORT_RESMPL_DISABLE,               /* resmpl:1         */          \

    VPORTDIS_DEFVAL_ENABLE,             /* defValEn:1       */          \

    VPORTDIS_BPK_10BIT_NORMAL,          /* bpk10Bit:1       */          \

                                                                        \

    VPORTDIS_VCTL1_HSYNC,               /* vctl1Config      */          \

    VPORTDIS_VCTL2_VSYNC,               /* vctl2Config      */          \

    VPORTDIS_VCTL3_FLD,                 /* vctl3Config      */          \

    7,                                  /* extCtl:3         */          \

                                                                        \

    HDIM_DIS_RAW_16BIT_LINE_SZ+30,      /* frmHSize         */          \

    HDIM_DIS_RAW_16BIT_NUM_LINES+5,     /* frmVSize         */          \

                                                                        \

    0,                                  /* imgHOffsetFld1   */          \

    0,                                  /* imgVOffsetFld1   */          \

    HDIM_DIS_RAW_16BIT_LINE_SZ,         /* imgHSizeFld1     */          \

    HDIM_DIS_RAW_16BIT_NUM_LINES,       /* imgVSizeFld1     */          \

                                                                        \

    0,                                  /* imgHOffsetFld2   */          \

    0,                                  /* imgVOffsetFld2   */          \

    0,                                  /* imgHSizeFld2     */          \

    0,                                  /* imgVSizeFld2     */          \

                                                                        \

    HDIM_DIS_RAW_16BIT_LINE_SZ,         /* hBlnkStart       */          \

    0,                                  /* hBlnkStop        */          \

                                                                        \

    0,                                  /* vBlnkXStartFld1  */          \

    1,                                                                             /* vBlnkYStartFld1  */          \

    0,                                  /* vBlnkXStopFld1   */          \

    3,                                                                             /* vBlnkYStopFld1   */          \

                                                                        \

    0,                                  /* vBlnkXStartFld2  */          \

    0,                                  /* vBlnkYStartFld2  */          \

    0,                                  /* vBlnkXStopFld2   */          \

    0,                                  /* vBlnkYStopFld2   */          \

                                                                        \

    0,                                  /* xStartFld1       */          \

    1,                                  /* yStartFld1       */          \

                                                                        \

    0,                                  /* xStartFld2       */          \

    0,                                  /* yStartFld2       */          \

                                                                        \

    HDIM_DIS_RAW_16BIT_LINE_SZ+9,       /* hSyncStart       */          \

    HDIM_DIS_RAW_16BIT_LINE_SZ+19,      /* hSyncStop        */          \

                                                                        \

    HDIM_DIS_RAW_16BIT_LINE_SZ,             /* vSyncXStartFld1  */          \

    1,                                  /* vSyncYStartFld1  */          \

    HDIM_DIS_RAW_16BIT_LINE_SZ+14,      /* vSyncXStopFld1   */          \

    2,                                  /* vSyncYStopFld1   */          \

                                                                        \

    0,                                  /* vSyncXStartFld2  */          \

    0,                                  /* vSyncYStartFld2  */          \

    0,                                  /* vSyncXStopFld2   */          \

    0,                                  /* vSyncYStopFld2   */          \

                                                                        \

    0,                                  /* yClipLow, unused */          \

    0,                                  /* yClipHigh, unused*/          \

    0,                                  /* cClipLow, unused */          \

    0,                                  /* cClipHigh, unused*/          \

                                                                        \

    0x00,                               /* Default Y value  */          \

    0x00,                               /* Default Cb value */          \

    0x00,                               /* Default Cr value */          \

                                                                        \

    VPORTDIS_RGBX_DISABLE,              /* RGB extract disable */       \

    1,                                  /* incPix, for raw mode only */ \

                                                                        \

    (HDIM_DIS_RAW_16BIT_LINE_SZ >> 3),  /* thrld            */          \

                                                                        \

    3,                                  /* numFrmBufs       */          \

    128,                                /* alignment        */          \

    VPORT_FLDS_MERGED,                  /* mergeFlds        */          \

                                                                        \

    NULL,                               /* segId            */          \

    NULL                                /* hEdma            */          \

}

  • The external signals simply cause the pixel/line counters to take on a specific pre-defined value.  You still need to configure all the registers appropriately.

    spruem1.pdf page 98 said:

    When the external HSYNC is asserted,
    FPCOUNT is loaded with the HRLD value and VCCOUNT is loaded with the CRLD value. VCTL2 may be
    configured as an external vertical sync input. When the external VSYNC is asserted during field 1,
    FLCOUNT is loaded with the VRLD value. Field determination is made using either VCTL3 as an external
    FLD input or by field detect logic using the VSYNC and HSYNC inputs.

  • You are right, I misunderstood the external sync operation mechanism before. The counters will reload at the rising edge of HSYNC/VSYNC(if configured as positive polarity), while keeping the signal level will have no effect on these counters.

    Now it works. Thank you!

  • I'm having a similar system but I want the FLD to be determined using the field detect logic. How do I do that? Do I use EXC and FLDD in VCxCTL (capture register) or do I configure VCTL3 as an output while configuring VCTL1/VCTL2 as horisontal/vertical external sync inputs?

     


    From SPRUEM1:

     

     

    Field determination is made using either VCTL3 as an external FLD input or by field detect logic using the VSYNC and HSYNC inputs.

     

  • Are you doing capture or display?  What mode of operation (BT.656, raw, etc.)?

     

  • I'm doing a raw display of 8-bit data. The major difference from the example above is that I don't have an FLD input, just HSYNC and VSYNC.

  •  

    I read through the VPIF document http://focus.ti.com/lit/ug/spruem1/spruem1.pdf and here is my analysis:

    1) In order to use the field determination, we could set the FXS bit in the VDCTL register to 1.

    2) The field detect signal could be obtained using the HSYNC and the VSYNC as explained in page 57.

  • Hello,

    My analysis is the same as yours if you mean that you can do either 1 or 2. Since I don't have an external FLD signal (the DSP pin isn't connected), just external HSYNC and VSYNC are available, I have to go with solution 2.

    My interpretation of page 57 is that if HSYNC and VSYNC go active within 64 clock cycles from each other (HSYNC before VSYNC or VSYNC before HSYNC) then field 1 is detected, otherwise field 2 is detected. Agree?

    The page before this, page 56, also describes how the field detect logic is activated by setting EXC = FLDD = 1 in the VCCTL register. However, VCCTL is a capture mode register. Is this still something I need to configure to enable field detect logic in display mode? Are there any other capture registers settings I need for proper display mode operation?

  • Hi,

      Regarding the FLDD bit in the VCCTL, based on table 3-15, this mode is not used for Raw data mode. However, in the display mode in table 4-7, Raw data mode can be used. So, I do think the capture mode register is independent of the display mode register.

  • I think we've found the sentences that tell us how this work:

    "For video display mode, field detect is enabled automatically when the VXS bit is set to 1 and the FXS bit is cleared to 0. Ensure that the FXS bit is not set to 1 because this causes the video port to expect a filed input on the pin."

    This is the very first paragraph in 4.12.2 at the bottom of page 123.