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.

[FAQ]: How to connect CAL to VIP on TDA2Px?

Part Number: TDA2PXEVM

TDA2Px supports Camera Adapter Layer (CAL) module to capture input over CSI interface. When YUV camera is connected to CAL over CSI interface, the data captured by CAL can be redirected to VIP module and VIP can be used for on the fly format conversion and down scaling before storing data in memory. This FAQ explains how to configure CAL and VIP to enable CAL to VIP path.

  • After Decoding CSI protocol data, CAL forwards the incoming pixel data to the next set of the components. One of this component is a Video Port (VP). VP is an output interface to which VIP ports can be connected. So on TDA2Px, VIP can receive input data either from external interface or from VP port of the CAL module and the input can be selected in control module register CTRL_CORE_CONTROL_SPARE_RW (0x4A002E68), bits [12:9]. As can be seen from this register, there are four VIP VIN1A, VIN2A, VIN3A and VIN4A, which can be connected to the CAL module, which essentially means CAL has 4 video ports output, which can be used to redirect 4 YUV camera to VIP port.


    In CAL, Input data is assigned an identifier known as CPORT ID and then in the internal modules, CPORT ID is configured to select incoming stream. CAL VP output is also required to be configured with the Cport Id. Since VP is single field for specifying Cport ID, the consecutive cport id is used for multiple VPs.

    In order to enable CAL -> VP -> VIP path in SW,

    • Configure VIP driver as below
      • createArgs.videoIfMode = FVID2_VIFM_SCH_DS_AVID_VSYNC
      • createArgs.videoIfWidth = FVID2_VIFW_16BIT
      • Vps_VipPortConfig.syncType = VPS_VIP_SYNC_TYPE_DIS_SINGLE_YUV
      • Vps_VipPortConfig.disCfg.lineCaptureStyle = VPS_VIP_LINE_CAPTURE_STYLE_AVID
      • Vps_VipPortConfig.disCfg.discreteBasicMode = TRUE
      • Set HS, VS and ACTVID polarity to Active High
    • Configure CAL driver as below
      • Configure CAL to receive data over CSI interface
      • Disable DMA write, vpsissCalCfg.writeToMem = FALSE
      • vpsissCalCfg.isVportCfgValid = TRUE
      • vpsissCalCfg.vportCfg.enable = TRUE
      • vpsissCalCfg.vportCfg.width = 0
      • vpsissCalCfg.vportCfg.pixClock = 0x10000
    • Make sure to start VIP driver first, before starting CAL driver.

    Rgds,

    Brijesh