【TI毫米波雷达笔记】MMWave配置流程避坑

【TI毫米波雷达笔记】MMWave配置流程避坑

在TI SDK目录下的mmwave.h文档说明中

强调了要按以下配置:

c 复制代码
mmWave API
The mmWave API allow application developers to be abstracted from the lower layer drivers and the mmWave link API.

The mmWave file should be included in an application as follows:

#include <ti/control/mmwave/mmwave.h>
Initializing the module
The mmWave module is initialized by using the MMWave_init API The module can execute in either of the following domains:

XWR14xx: The module executes on the MSS
XWR16xx/XWR18xx/XWR68xx: The module executes on both the MSS and DSS
Synchronizing the module
Once the module has been initialized it has to be synchronized before it can be used. This is done using the MMWave_sync API. This is required because on the XWR16xx/XWR18xx/XWR68xx the module can execute on both the DSS and MSS. We need to ensure that the modules on each domain are operational before they can be used.

On the XWR14xx; the synchronization is not really required but in order to maintain the same API behavior between XWR14xx and XWR16xx/XWR18xx/XWR68xx the API needs to be invoked.

Opening the module
After the mmWave module has been synchronized; the mmWave module needs to be opened. This will initialize the mmWave link to the BSS. While operating in minimal mode applications can invoke the mmWave link API directly after this step has been initiated.

In cooperative mode; only one of the domains should be deemed responsible for opening the mmWave module.

Note
xWR18xx: If the BPM chirp is a valid chirp used for the current frame, then make sure custom calibration config (MMWave_OpenCfg_t::customCalibrationEnableMask) is used in MMWave_open to override the default calibration mask and adhere to the recommendation by mmwavelink.
Configuration of the module
Applications are responsible for populate and configuring the BSS using the configuration MMWave_config API. The API will take the application supplied configuration and will pass this to the BSS via the mmWave link API(s). Application developers are abstracted from the calling sequence and the various synchronization events which are required.

Once the configuration has been completed; the application can setup the data path. After the data path has been successfully configured application developers can start the mmWave.

The mmWave module can be configured by multiple domains but the applications should ensure that the configuration done by a domain be completed before the other domain initiates the configuration. Failure to do so will result in unpredictable behavior.

Starting the mmWave
After successful configuration the mmWave needs to be started using the MMWave_start API. On successful execution of the API the data path is being excercised.

Executing the mmWave module
The mmWave module requires an execution context which needs to be provided by the application. This is because there are asynchronous events and response messages which are received by the BSS using the mmWave Link infrastructure. Thes need to be handled and processed in the application supplied execution context.

Failure to provide and execution context and not invoking the MMWave_execute API can result in the mmWave API getting stuck and the application loosing synchronization with the other domains in the system.

Callback functions
While working in the cooperative mode the mmWave is executing on both the MSS and DSS. Each domain registers a callback function which is invoked by the mmWave module if the peer domain does an equivalent operation.

For example:- The table below illustrates an example flow of the mmWave API and the invocation of the callback function in the peer domain

MSS	DSS
MMWave_open(&openCfg)	openFxn (ptrOpenCfg)
cfgFxn (ptrControlCfg)	MMWave_config (&ctrlCfg)
MMWave_start (&startCfg)	startFxn (ptrStartCfg)
MMWave_stop ()	stopFxn ()
MMWave_close ()	closeFxn ()
Callback functions allow an application to be notified when an action has been taken. Along with this the equivalent parameters are also passed to the peer domain. This allows both the domains to remain synchronized

Error Code
The mmWave API return an encoded error code. The encoded error code has the following information:-

Error or Informational message
mmWave error code
Subsystem error code The mmWave module is a high level control module which is basically layered over multiple modules like the mmWave Link, Mailbox etc. When an mmWave API reports a failure it could be because of a multitude of reasons. Also the mmWave Link API reports certains errors as not fatal but informational. In order to satisfy these requirements the error code returned by the mmWave API is encoded. There exists a MMWave_decodeError which can be used to determine the exact error code and error level.

也就是按 MMWave_init - MMWave_sync - MMWave_open - MMWave_config进行配置

然后用 MMWave_start 开启 用 MMWave_stop 结束

但实际上在调用 MMWave_start 之前 还要用 MMWave_addChirp 和 MMWave_addProfile 来进行配置 如果有BPM模式还需要调用 MMWave_addBpmChirp

而这三个函数 都会返回一个handle值 同样需要一个全局变量handle来接收

相关推荐
问心无愧05132 分钟前
ctf show web 178
前端·笔记
ljt27249606619 分钟前
Vue笔记--路由
javascript·vue.js·笔记
疯狂打码的少年35 分钟前
【计算机网络】网络互连设备(中继器 / 网桥 / 交换机 / 路由器 / 网关)
网络·笔记·计算机网络·智能路由器
ljt27249606611 小时前
Vue笔记--状态管理
前端·vue.js·笔记
John_ToDebug9 小时前
判断力无法被 AI 替代,但它正在被你亲手扔掉
经验分享·笔记
柳鲲鹏11 小时前
运气学概论:提纲草案
笔记
疯狂打码的少年13 小时前
【计算机网络】子网掩码与子网划分计算(含CIDR表示法)
服务器·笔记·计算机网络·php
自小吃多14 小时前
PCB Editor软件复制、改变、删除操作笔记
笔记·嵌入式硬件
动词ing16 小时前
【学习笔记】数据结构栈与队列(栈先进后出+队列先进先出+括号匹配+消消乐模型)
数据结构·笔记·学习
彧azz16 小时前
Git 入门实操实例:从安装到远程仓库全流程
大数据·笔记·git·学习·elasticsearch