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.

Interfacing C6748 to TVP5158, line-interleaved modes

Other Parts Discussed in Thread: TVP5158

Hi all,

I am interfacing the VPIF on the C6748 with a TVP5158 video decoder. I've been able to capture 1 channel of D1 NTSC video using this configuration. However, my attempts to capture the 2- and 4-channel line-interleaved modes from the decoder have not been successful. I have used the values provided in the decoder datasheet to program the VPIF, but to no effect. The system begins running, but no interrupts are generated by the VPIF for any of the line-interleaved modes. Looking in the memory window in CCS, I can see that no data is being written to the frame buffers.

 

Does anyone have any suggestions on how to proceed? There don't appear to be any statistics collection registers in the VPIF.

 

I'm developing code for the DSP using CCS 3.3 and DSP/BIOS 5.41, and have a C6748 EVM connected to a TVP5158 EVM.

  • I realized I should have included additional details in my original post. Here are the relevant VPIF settings for the 4-channel mode I mentioned earlier. Any registers not listed have been zeroed. Ancillary data is not used.

    Thanks in advance! I appreciate any help you can offer with this issue.

    ~~~~~~~~~~~~~~~~~~~~

    TVP5158 mode: 4-channel D1 NTSC cropped (progressive, 16-bit parallel Y/C), line-multiplexed.

    The C6748 receives Y data on Channel 0, and C data on Channel 1. Each channel operates independently on what looks like a single channel of 8-bit progressive, Y/C non-multiplexed data. I have enabled interrupts only on Channel 0, as data on both channels is synchronized to the same pixel clock. I have assumed that only the top luma address registers need to be configured in this mode, but have not been able to confirm this.

    0x01E17004    00001001    C0CTRL: FIELDFRAME=1, YCMUX=0, CHANEN=1
    0x01E17008    00000001    C1CTRL: CHANEN=1
    0x01E17020    00000011    INTEN: ERROR=1, FRAME0=1
    0x01E17024    00000011    INTSET: ERROR=1, FRAME0=1
    0x01E17038    00000080    REQSIZE = 128 bytes

    0x01E17040    C0000000   C0TLUMA = top of luma buffer in DDR
    0x01E17044    00000000    C0BLUMA = 0
    0x01E17048    00000000    C0TCHROMA = 0
    0x01E1704C    00000000    C0BCHROMA = 0

    0x01E17064    000002C8   C0IMGOFFSET = 712 (704 bytes data + 4 bytes start code, rounded up for 8-byte alignment)

    0x01E1706C    008802C4  C0HCFG: EAV2SAV=136, SAV2EAV=708
    0x01E17070    00010002   C0VCFG0: L1 = 1, L3=2
    0x01E17074    08360000   C0VCFG1: L5 = 2102, L7=0
    0x01E17078    00000000   C0VCFG2: L9 = 0, L11=0
    0x01E1707C    00000836   C0VSIZE: 2102

    0x01E17088    C016D0A0  C1TLUMA = top of chroma buffer in DDR (= C0TLUMA + 712 bytes/line * 2100 lines)

    ... the remaining C1 size configuration registers are identical to those for C0.

  • Hi,

    Just to make sure that I understand the setup.

    mys said:
    I have used the values provided in the decoder datasheet to program the VPIF, but to no effect.

    Are you referring to table 3-11 in the tvp5158 datasheet? -- 4-Ch D1 (16-bit)? Please first make sure TVP5158 is indeed sending out the expected data (check the TVP5158 regsiters via I2C?). In case you have any questions on TVP5158, you can post them here: http://e2e.ti.com/support/data_converters/videoconverters/default.aspx

    Some quick thoughts.

    1. 54MHz clock going into both ch0 and ch1?

    2. C0CTRL[10]=C1CTRL[10]=1.

    3. Try setting C1CTRL[12]=1 as well.

    4. Enable C0 and C1 at the end, after completeing all other initialization.

    5. check the status registers of VPIF. vary REQSIZE if needed.

     

    mys said:
    ... the remaining C1 size configuration registers are identical to those for C0.

    C0HCFG = C1HCFG, C0VCFGx=C1VCFGx, C0VSIZE=C1VSIZE, C0IMGOFFSET=C1IMGOFFSET??

  • I am now receiving interrupts from the VPIF after setting the INTRPROG bit to 1 in C0CTRL and C1CTRL. The datasheet describes INTRPROG as "Output display format", so I didn't take it into consideration in my earlier register settings. Thanks for the tip, I'm relieved to finally be seeing signs of life on the VPIF!

    I will confirm that the data received is correct, now that I have frame grabs to work with. I will post back with results.

  • Yes. the user guide meant the output format of the source, which is the VPIF capture format. ^_^