【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来接收

相关推荐
liuyicenysabel13 分钟前
Flask 个人站 iProfile 上线笔记(k3s + Nginx + Let‘s Encrypt)
笔记·nginx·flask
深蓝海拓16 分钟前
基于QtPy (PySide6) 的PLC-HMI工程项目(十五)后续完善和改进:PLC端数据解析的防粘包、残包、废包、拆包
笔记·学习·plc
小黄蚁28 分钟前
LVGL学习笔记(六)
笔记·学习
Wang's Blog1 小时前
PostgreSQL笔记49:向量检索核心算法、索引调优与过滤策略深度解析
笔记·算法·postgresql
疯狂打码的少年1 小时前
【数据结构】交换类排序:冒泡与快速排序
数据结构·笔记·算法·排序算法
chnyi6_ya1 小时前
VideoHallu 论文阅读笔记
论文阅读·笔记
Wang's Blog2 小时前
PostgreSQL笔记51: 基于 pgvector 构建企业级智能问答系统
数据库·笔记·postgresql
自小吃多2 小时前
Capture软件原理图添加差分属性笔记
笔记·嵌入式硬件
日常筹谋记3 小时前
ATS选不对运维两行泪:数据中心市电与柴发切换场景的双电源自动转换开关选型笔记
运维·数据库·笔记
疯狂打码的少年3 小时前
【数据结构】哈希表:构造与冲突处理
数据结构·笔记·哈希算法·散列表