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.

VPIF example code for raw image capture CCS?

Other Parts Discussed in Thread: OMAP-L138

Where can i find some CCS VPIF raw image capture examples....?am new to this community plse guide help!

  • Which TI part are you using?

    Regards, Srirami.

  • We don't have a CCS raw capture testcase for the public yet. This below is the init portion of our internal code, doing 2048x1536 raw capture. Please keep in mind this is for reference only and we will not provide support on it. For more raw capture support, you can post the question in the Linux forum.

     VPIF_REGS->CH0_TOP_STRT_LUMA = (Uint32) inputBufferYT;
     VPIF_REGS->CH0_CTRL = 
      (CSL_VPIF_CH0_CTRL_DATA_BIT_WIDTH_BIT_12 << CSL_VPIF_CH0_CTRL_DATA_BIT_WIDTH_SHIFT) |
      (1536 << CSL_VPIF_CH0_CTRL_INTERVAL_LINE_INT_SHIFT) |
      (CSL_VPIF_CH0_CTRL_INPUT_FIELD_FRAME_FRAME << CSL_VPIF_CH0_CTRL_INPUT_FIELD_FRAME_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_NIP_PROGRESS << CSL_VPIF_CH0_CTRL_CH0_NIP_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_VANC_EN_CH0_VRT_DIS << CSL_VPIF_CH0_CTRL_CH0_VANC_EN_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_HANC_EN_CH0_HZN_DIS << CSL_VPIF_CH0_CTRL_CH0_HANC_EN_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_INT_CTRL_CH0_TOP_BTM << CSL_VPIF_CH0_CTRL_CH0_INT_CTRL_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_YC_MUX_CH0_NON_YC << CSL_VPIF_CH0_CTRL_CH0_YC_MUX_SHIFT ) |
      (2 << CSL_VPIF_CH0_CTRL_CH0_FMT_SHIFT ) |
      (CSL_VPIF_CH0_CTRL_CH0_EN_CH0_DIS << CSL_VPIF_CH0_CTRL_CH0_EN_SHIFT)
      ;
       VPIF_REGS->CH0_CTRL = (VPIF_REGS->CH0_CTRL & ~CSL_VPIF_CH0_CTRL_CH0_SDR_FMT_MASK) |
        (CSL_VPIF_CH0_CTRL_CH0_SDR_FMT_CH0_RAS << CSL_VPIF_CH0_CTRL_CH0_SDR_FMT_SHIFT ) ;

     VPIF_REGS->CH1_CTRL = 
      (CSL_VPIF_CH1_CTRL_CH1_NIP_PROGRESS << CSL_VPIF_CH1_CTRL_CH1_NIP_SHIFT ) |
      (CSL_VPIF_CH1_CTRL_CH1_VANC_EN_CH1_VRT_DIS << CSL_VPIF_CH1_CTRL_CH1_VANC_EN_SHIFT ) |
      (CSL_VPIF_CH1_CTRL_CH1_HANC_EN_CH1_HZN_DIS << CSL_VPIF_CH1_CTRL_CH1_HANC_EN_SHIFT ) |
      (CSL_VPIF_CH1_CTRL_CH1_INT_CTRL_CH1_TOP_BTM << CSL_VPIF_CH1_CTRL_CH1_INT_CTRL_SHIFT ) |
      (CSL_VPIF_CH1_CTRL_CH1_YC_MUX_CH1_NON_YC << CSL_VPIF_CH1_CTRL_CH1_YC_MUX_SHIFT ) |
      (2 << CSL_VPIF_CH1_CTRL_CH1_FMT_SHIFT ) |
      (CSL_VPIF_CH1_CTRL_CH1_EN_CH1_DIS << CSL_VPIF_CH1_CTRL_CH1_EN_SHIFT)
      ;

       VPIF_REGS->CH1_CTRL = (VPIF_REGS->CH1_CTRL & ~CSL_VPIF_CH1_CTRL_CH1_SDR_FMT_MASK) |
        (CSL_VPIF_CH1_CTRL_CH1_SDR_FMT_CH1_RAS << CSL_VPIF_CH1_CTRL_CH1_SDR_FMT_SHIFT ) ;

     VPIF_REGS->CH0_IMG_ADD_OFST = VPIF_REGS->CH1_IMG_ADD_OFST = 2048*2;
     VPIF_REGS->REQ_SIZE = 32;
     VPIF_REGS->EMUL_CTL = 1;

     VPIF_REGS->CH0_H_CFG = VPIF_REGS->CH1_H_CFG = (511 << 16) | (2048 << 0);
     VPIF_REGS->CH0_V_SIZE= VPIF_REGS->CH1_V_SIZE= 1536+26;
     VPIF_REGS->CH0_V_CFG_00= VPIF_REGS->CH1_V_CFG_00= (1 << 16) | (1 << 0);
     VPIF_REGS->CH0_V_CFG_01= VPIF_REGS->CH1_V_CFG_01= (1537 << 16) | (564 << 0);

  • i use L138 TI part

  • Manu, The code I posted can be use as a reference setup for L138.

  • Thanks paul, Where do i get CSL document for VPIF.

  • Manu,

    The one referred to in my code is internal only. But the naming should be self explanatory, please use them as pseudo code only, and there will be no support attached to it.

  • Thanks for the help. Currently i am trying to run the PSP driver VPIF raw capture example code.

    My PSP driver example code path is: C:\ti\OMAP-L138_dsp_1_00_00_11\pspdrivers_01_30_01\packages\ti\pspiom\examples\evmOMAPL138\vpifraw

    XDC Tools installed path is: C:\ti\xdctools_3_20_03_63

    When i buid the code i get the error: NO XDCtools are currently installed. Please install XDC tools, and the highest available version of XDC tools will be used when building this project.

    Please guide me how to avoid this error.

  • This is a Linux/PSP specific question. I am moving this to related forum.

    Regards,
    Gaurav

  • hi,Paul.When I set the vpif reg for raw like what you said ,I got a  problem that what have I recv data is like this:

    cd 00 ca 00 cd 00 ..

    17 a0 a8 ..

    It is not a right picture,can you help me?

     

  • Hi Paul,

    Thanks for your code. It's really helpful. And the vpif has received data from the sensor (OV5642, 2048X1536). However, it still has some problems.

    Well,  what I want to know is:

    In the DM646x vpif user guide, it  says that when vpif sets the raw capture mode, we don't need to configure the image size registers, including CHn_H_CFG, CHn_V_SIZE, CHn_V_CFG_00 and CHn_V_CFG_00, but you set these registers in your test code. So, dose it matter if I just leave these registers uninitialised c'ause I can't find exact parameters for these registers in the OV5642 datasheet.