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.

CCS/AWR1642BOOST: How can I find in the demo code the connection from DPM_execute to DPC_ObjectDetection_ioctl?

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642

Tool/software: Code Composer Studio

Hi,

I would like to understand the code of the mmwaveDemo-Code for AWR1642. In the picture of the chapter "system execution flow" of the sdk doxygen  I started to consider the DSS part (I also attached the part of the picture . After SOC_Int, DPM_Int and DPM_Sync,  the MMWave_DPC_ObjectDection_dpmTask is create and therein the DPM_execute is executed. The next step I could not follow. How will the function DPC_ObjectDetection_ioctl be acitvate and where can I find this in the code?

  • Hi,

    We are checking with software team and will get back to you

    Thank you

    Cesar

  • The DPC_ObjectDetection_ioctl  is indirectly called by the DPM, the registration of this function is done during init time as seen in code below. A DPC implements all such APIs and registers it with DPM then application code calls DPM APIs. So the registered ioctl will be activated when the DPM_ioctl is called [which can be seen in the picture leading up to the registered function], this DPM function will relay the message across the other side if remote configuration as in the diagram customer quoted [all mechanics are abstracted from the user, that is the value of DPM abstraction] and its counterpart there will call the registered ioctl function.

    Please read section “Data Path” in the UG also to better understand the architecture besides reading the DPM doxygen.

     

    DPM_ProcChainCfg gDPC_ObjectDetectionCfg =

    {

        DPC_ObjectDetection_init,            /* Initialization Function:         */

        DPC_ObjectDetection_start,           /* Start Function:                  */

        DPC_ObjectDetection_execute,         /* Execute Function:                */

        DPC_ObjectDetection_ioctl,           /* Configuration Function:          */

        DPC_ObjectDetection_stop,            /* Stop Function:                   */

        DPC_ObjectDetection_deinit,          /* Deinitialization Function:       */

    #ifdef OBJDET_NO_RANGE

        DPC_ObjectDetection_dataInjection,   /* Inject Data Function:            */

        NULL,                                /* Chirp Available Function:        */

    #else

        NULL,                                /* Inject Data Function:            */

        DPC_ObjectDetection_chirpEvent,      /* Chirp Available Function:        */

    #endif

        DPC_ObjectDetection_frameStart       /* Frame Start Function:            */

    };

     

    …..

        dpmInitCfg.socHandle        = socHandle;

        dpmInitCfg.ptrProcChainCfg  = &gDPC_ObjectDetectionCfg;

        dpmInitCfg.instanceId       = 0xFEEDFEED;

        dpmInitCfg.domain           = DPM_Domain_LOCALIZED;

        dpmInitCfg.reportFxn        = ObjectDetection_Test_reportFxn;

        dpmInitCfg.arg              = &objDetInitParams;

        dpmInitCfg.argSize          = sizeof(DPC_ObjectDetection_InitParams);

       

     

        /* Initialize the DPM Module: */

        dataPathObj->dpmHandle = DPM_init (&dpmInitCfg, &errCode);

    Thank you

    Cesar

  • Thanks Cesar,

    I have one small question:

    Where can I find the above-mentioned expression "DPM_ProcChainCfg gDPC_ObjectDetectionCfg" in the programm?

    Kind regards,

    Clemens

  • Hi Clemens,

    Please feel free to search code and also get familiar with directory/file organization, which is shown in the UG. Many editors allow you to browse and search code very easily including in CCS, these editors do an indexing of the entire source tree you point them to and allow you to cross-reference etc very fast. We often navigate code this way during development.

    thanks