IWR1843 mmwave_sdk代码问题:我看到在初始化时设置的执行模式为MMWave_ExecutionMode_ISOLATION,即在MSS里MmwDemo_mmWaveCtrlTask——>MMWave_execute——>MMWave_deviceExecuteFxn里的代码如下:
if (ptrMMWaveMCB->initCfg.executionMode == MMWave_ExecutionMode_ISOLATION)
{
/* Isolation Mode: There is no need to monitor the peer domain. We are done. */
retVal = 0;
goto exit;
}
而不会执行Cooperative Mode:代码段里的MmwDemo_eventCallbackFxn。在MSS里相当于没有调用监视函数MmwDemo_DPC_ObjectDetection_reportFxn。
而在DSS初始化函数里 dpmInitCfg.reportFxn = MmwDemo_DPC_ObjectDetection_reportFxn;
但是在MmwDemo_DPC_ObjectDetection_dpmTask里并没有调用。
我的问题就是这个报告监视函数MmwDemo_DPC_ObjectDetection_reportFxn是在哪里调用的,因为这个函数里包含通过uart发送数据到上位机。感觉有点迷糊,而且我去追函数调用树在执行上下文中MMWave_config等函数都没有调用到配置是在初始化里就完成的么,还是有默认值,
你好,
请看看下面的相关代码和实现。
\packages\ti\demo\xwr18xx\mmw\dss\dss_main.c
/* Setup the configuration: */
dpmInitCfg.socHandle = gMmwDssMCB.socHandle;
dpmInitCfg.ptrProcChainCfg = &gDPC_ObjectDetectionCfg;
dpmInitCfg.instanceId = 0xFEEDFEED;
dpmInitCfg.domain = DPM_Domain_REMOTE;
dpmInitCfg.reportFxn = MmwDemo_DPC_ObjectDetection_reportFxn;
dpmInitCfg.arg = &objDetInitParams;
dpmInitCfg.argSize = sizeof(DPC_ObjectDetection_InitParams);
/* Initialize the DPM Module: */
gMmwDssMCB.dataPathObj.objDetDpmHandle = DPM_init (&dpmInitCfg, &errCode);
\packages\ti\control\dpm\dpm.h
/**
* @b Description
* @n
* Applications can register a report function which is invoked by the module
* to report the status of the processing chain to the application. The mechanism
* can be used to inform the applications about the status of the processing chain.
*
* @param[in] reportType
* Report Type
* @param[in] instanceId
* DPM Instance Identifier which generated the response.
* @param[in] errCode
* Error code associated with the status event. This will be set to 0 to indicate
* that the report was successful.
* @param[in] arg0
* Optional argument.
* @param[in] arg1
* Optional argument.
*
* *NOTE*: Please refer to the @ref DPM_Report for more information
* about the optional arguments and how to interpret them.
*
* @retval
* Not applicable
*/
typedef void (*DPM_ReportFxn) (DPM_Report reportType,
uint32_t instanceId,
int32_t errCode,
uint32_t arg0,
uint32_t arg1);
\packages\ti\control\dpm\src\dpm_msg.c
const DPM_MsgHandler gDPMMessageFxnTable[DPM_MessageId_MAX] =
{
NULL, /* Invalid : DPM_MessageId_INVALID */
DPM_msgStartHandler, /* Start : DPM_MessageId_START */
DPM_msgStopHandler, /* Stop : DPM_MessageId_STOP */
DPM_msgDPCCfgHandler, /* DPC Cfg : DPM_MessageId_DPC_CFG */
DPM_msgBSSFaultHandler, /* BSS Fault : DPM_MessageId_BSS_FAULT */
DPM_msgAssertHandler, /* Assert : DPM_MessageId_DPC_ASSERT */
DPM_msgResultHandler, /* Result : DPM_MessageId_RESULT */
DPM_msgDPCInfoHandler, /* DPC Info : DPM_MessageId_DPC_INFO */
DPM_msgResponseHandler /* Response : DPM_MessageId_RESPONSE */
};