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

相关推荐
IT笔记3 分钟前
【Rust】Rust数组和Vec安全读写笔记
笔记·安全·rust
javaGHui11 分钟前
安卓传感器横竖屏切换
android·经验分享·笔记
丝斯201121 分钟前
AI学习笔记整理(19)—— AI核心技术(深度学习3)
人工智能·笔记·学习
im_AMBER23 分钟前
Leetcode 66 几乎唯一子数组的最大和
数据结构·笔记·学习·算法·leetcode
客梦24 分钟前
数据结构-图结构
java·数据结构·笔记
Cathy Bryant37 分钟前
信息论(11):链式法则-证明
笔记·算法·数学建模·概率论·信息与通信
搞机械的假程序猿1 小时前
普中51单片机学习笔记-AT24C02读写
笔记·学习·51单片机
暗然而日章1 小时前
C++基础:Stanford CS106L学习笔记 3 流
c++·笔记·学习
jimmyleeee1 小时前
人工智能基础知识笔记二十二:构建一个可以搜索Web的Agent
笔记
AA陈超1 小时前
只想克隆项目中的 Source 文件夹,而不影响其他内容
笔记·git·学习