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.

TDA3: OV2311 sensor driver dev, ddc_update ASSERT, using OV2775/TIDA01130 as baseline

Part Number: TDA3

Running on a TDA3x RVP with UB960 deserializer, I am in the process of testing out an OV2311/UB953 camera module with a new driver, mainly lifted from the OV2775/TIDA01130 driver in the vision sdk.

 

Added all the code very similar to the OV2775 and am now working on making sure the camera module can be accessed via I2C and GPIO. Keep in mind that the OV2311 is a B/W sensor, i.e. it probably does not need much from the ISP. I realize there is probably some tuning involved, but initially I am trying to disable as much of that as possible.

 

All the DCC parameters are currently just brought over from the OV2775 and we can disable as necessary.

 

The usecase is a single sensor use-case from the ISS usecases for the TDA3x RVP. I have tested it with a single sensor OV10640 IMI camera, which worked fine.

 

The code currently runs into the following Assert:

 

[IPU1-0]   5464.861404 s:  QSPI Read Started, please wait! 

[IPU1-0]   5464.861617 s:  QSPI Read Completed Sucessfully 

[IPU1-0]   5464.863478 s:  CHAINS: DCC Tag ID check failed for QSPI 

[IPU1-0]   5464.863569 s:  CHAINS: Using DCC Profile from Driver 

[IPU1-0]   5464.863783 s:  Assertion @ Line: 435 in /home/gunter/PROCESSOR_SDK_VISION_03_03_00_00_RTOS/vision_sdk/apps/src/rtos/iss/src/common/iss_utils.c: 0 == status : failed !!!

 

Tracing through this it leads to dcc_update() failing with -1.

 

Should I just disable for the moment the DCC stuff and with the goal to get the sensor initialized and sending data? Please let me know.

 

 

Here is the code tracing through this

 

Void chains_issIspSimcop_Display_StartApp(chains_issIspSimcop_DisplayAppObj *pObj)

{

    Chains_memPrintHeapStatus();

 

    /* Sets the Simcop Config also */

    chains_issIspSimcop_Display_SetIspConfig(pObj);

...

 

 

Void chains_issIspSimcop_Display_SetIspConfig(

            chains_issIspSimcop_DisplayAppObj *pObj)

{

    appSetDefaultIspParams(&pObj->appSensInfo);

    appSetIspParamsFromDCC(&pObj->appSensInfo);

}

 

 

Void appSetIspParamsFromDCC(AppUtils_Obj *pObj)

{

    Int32 status;

    IssSensor_DccParams sensorDccPrms;

    AppUtils_IssObj *pIssObj = &gAppUtilsIssObj;

 

    status = IssSensor_GetSensorInfo(pObj->sensorName, &pIssObj->sensorInfo);

    UTILS_assert(SYSTEM_LINK_STATUS_SOK == status);

 

    if (ISS_SENSOR_FEATURE_DCC_SUPPORTED ==

        (ISS_SENSOR_FEATURE_DCC_SUPPORTED & pIssObj->sensorInfo.features))

    {

        sensorDccPrms.chId = 0;

        /* Get the default Profile from the sensor */

        status = IssSensor_Control(pIssObj->sensorHandle,

            ISS_SENSORS_IOCTL_GET_DCC_PARAMS, &sensorDccPrms, NULL);

        UTILS_assert(SYSTEM_LINK_STATUS_SOK == status);

 

        /* Reads default configuration from the sensor layer,

           then reads and parses DCC Profile and saves it in the isp and

           simcop config */

        IssUtils_ReadAndParseDccConfig(

                pIssObj->sensorInfo.ramOffset,

                sensorDccPrms.pDccCfg,

                sensorDccPrms.dccCfgSize,

                pIssObj->issAewbLinkId);

    }

}

 

 

Void IssUtils_ReadAndParseDccConfig(

        UInt32 qSpiOffset,

        UInt8 *pSensorDccCfg,

        UInt32 sensorDccCfgSize,

        UInt32 linkId)

{

    Int32                                    status;

    UInt32                                  *header = NULL;

    AlgorithmLink_IssAewbDccControlParams    dccCtrlPrms;

 

    UTILS_assert(0 != qSpiOffset);

    UTILS_assert(0 != sensorDccCfgSize);

    UTILS_assert(NULL != pSensorDccCfg);

 

    /* DCC is supported only if this flag is set in the driver,

       even dcc profile from qspi is supported only if this flag is set.

       Otherwise DCC parameters will not be used at all and configuration

       from the video sensor laye will be used */

    {

        /* Steps:

            1, Get the Default DCC Profile the sensor

            2, Get the DCC Profile Memory from the AEWB algorithms

            3, Read DCC file from Qspi if available

            4, If not available, copy dcc profile from sensor

            5, Parse the DCC and set the output */

 

....

 

            {

                /* 5, Parse the DCC and set the output */

                dccCtrlPrms.baseClassControl.controlCmd =

                    ALGORITHM_AEWB_LINK_CMD_PARSE_AND_SET_DCC_PARAMS;

                dccCtrlPrms.baseClassControl.size = sizeof(dccCtrlPrms);

 

                status = System_linkControl(

                    linkId,                               //GHS =50

                    ALGORITHM_LINK_CMD_CONFIG,

                    &dccCtrlPrms,

                    sizeof(dccCtrlPrms),

                    TRUE);

                UTILS_assert(0 == status);

            }

        }

        else

        {

            Vps_printf(" CHAINS: DCC buffer is NULL \n");

        }

    }

}

 

 

 

        case ALGORITHM_AEWB_LINK_CMD_PARSE_AND_SET_DCC_PARAMS:

        {

            dccCtrlPrms = (AlgorithmLink_IssAewbDccControlParams *)

                                    pControlParams;

 

            if (NULL != dccCtrlPrms)

            {

                /* ISP Config is local object, so ok to reset it. */

                memset(&pAlgObj->dccObj.ispCfgPrms,

                       0,

                       sizeof(IssIspConfigurationParameters));

                memset(&pAlgObj->dccObj.simcopCfgPrms,

                       0,

                       sizeof(IssM2mSimcopLink_ConfigParams));

                status = Dcc_parse_and_save_params(

                            pAlgObj,

                            &pAlgObj->dccObj.ispCfgPrms,

                            &pAlgObj->dccObj.simcopCfgPrms,

                            dccCtrlPrms->dccBufSize);

 

                if (0 == status)

 

 

 

Int32 Dcc_parse_and_save_params(

    AlgorithmLink_IssAewbObj *pAlgObj,

    IssIspConfigurationParameters *pIspCfg,

    IssM2mSimcopLink_ConfigParams *pSimcopCfg,

    UInt32 dccBufSize)

{

    Int32 status = SYSTEM_LINK_STATUS_SOK;

    Dcc_Object *pDccObj = NULL;

    dcc_parser_output_params_t *pDccOutPrms = NULL;

 

    UTILS_assert(NULL != pAlgObj);

    UTILS_assert(NULL != pIspCfg);

    UTILS_assert(NULL != pSimcopCfg);

 

    pDccObj = &pAlgObj->dccObj;

    pDccOutPrms = &pDccObj->dccOutPrms;

 

    /* Reset all Flags */

    dccResetFlags(pDccOutPrms);

 

    pDccObj->dccInPrms.dcc_buf = (UInt8 *)pDccObj->dccInBuf;

    pDccObj->dccInPrms.dcc_buf_size = dccBufSize;

    pDccObj->dccInPrms.color_temparature = pAlgObj->aewbOut[0].colorTemp;

    pDccObj->dccInPrms.exposure_time = pAlgObj->aewbOut[0].expTime;

    pDccObj->dccInPrms.analog_gain = pAlgObj->aewbOut[0].analogGain;

    pDccObj->dccInPrms.cameraId = pAlgObj->algLinkCreateParams.dccCameraId;

 

    status = dcc_update(&pDccObj->dccInPrms, &pDccObj->dccOutPrms);         //GHS this fails with -1

 

    if (0 == status)

 

 

Where is dcc_update implemented? I cannot find it btw.

What is the best way to get past this ASSERT and be able to test with the sensor with minimal ISP/SIMCOP configuration?

Thanks!

--Gunter

  • Hi all,


    BTW, I have been taking the DCC update out of the code by commenting out the following

    IssUtils_ReadAndParseDccConfig(
    pIssObj->sensorInfo.ramOffset,
    sensorDccPrms.pDccCfg,
    sensorDccPrms.dccCfgSize,
    pIssObj->issAewbLinkId);

    And at that point the code does run to completion without the Assert and the usecase comes up. No camera capture yet, but with that I can dig into the camera sensor specific setup.


    Is this a good way to temporarily disable the DCC? The linkID here is 50, which is the AEWB algorithm.


    Regards,
    --Gunter
  • Gunter,

    You could remove ISS_SENSOR_FEATURE_DCC_SUPPORTED from the sensor feature list to remove DCC support.

    Regards,
    Brijesh
  • Hi Brijesh,

    sorry it took me a little while to get back to the OV2311. I disabled the DCC FEATURE, that worked. Also digging in deeper into the I2C sensor commands now and have been able to read the CHIP ID from the sensor via the UB960/UB953 with the alias I2C address and programming the UB953 with I2C address 0x60 for the sensor.


    Regards,
    --Gunter