mmwave_sdk_user_guide.pdf 文档的解读
名词简称
- BSS (BIST / Baseband Subsystem - 雷达底层与射频子系统)
- 核心职责: 控制所有的 RF(射频)和模拟前端硬件。包括生成 FMCW(调频连续波)信号、控制 3 个发射天线 (TX) 和 4 个接收天线 (RX)、以及执行雷达的底层校准和自检(BIST, Built-In Self Test)。
- 处理单元: 它的内部其实包含了一颗专门的 ARM Cortex-R4F 处理器,但这颗核心是被 TI 锁定和预编程的(运行固化在内部 ROM 中的固件)。
- 开发者权限: 作为开发者,你不需要(也无法)直接编写 BSS 的代码。你只需要在应用层通过 API 指令(利用 Mailbox 邮箱通信机制)来配置它的参数,比如 Chirp(线性调频脉冲)的频率、斜率、帧率等。
- DSS (DSP Subsystem - 数字信号处理子系统)
- 核心职责: 当 BSS 将接收到的雷达回波信号转换为数字信号(ADC 数据)并存入共享内存后,DSS 就会接手处理这些海量数据。它负责执行 1D FFT(计算距离)、2D FFT(计算速度)、CFAR(恒虚警率检测)、3D FFT 及角度估计(DOA)等核心雷达底层算法,最终生成雷达点云数据 (Point Cloud)。
- 处理单元: 它搭载了一颗强大的 C674x 浮点 DSP(数字信号处理器),并且配备了专用的雷达硬件加速器 (HWA, Hardware Accelerator),用来极大地加速 FFT 等常规且繁重的雷达矩阵运算。
- 开发者权限: 你可以在 DSS 中编写和优化雷达信号处理算法,通常使用 C/C++,并调用 TI 提供的 DSPLib 等算法库。
- MSS (Master Subsystem - 主控制子系统)
- 核心职责: 它负责管理整个芯片的启动、外设(UART、CAN-FD、SPI、I2C 等)的通信、以及系统状态监控。同时,当 DSS 计算出基础的点云数据后,MSS 通常会接手进行更高阶的处理,比如目标追踪 (Tracking) 和聚类 (Clustering),最后将处理好的目标数据打包,通过接口发送给上位机或外部控制器。
- 处理单元: 它搭载了一颗主频为 200MHz 的 ARM Cortex-R4F 处理器。
- 开发者权限: 你可以完全掌控 MSS。你通常需要在这里编写基于操作系统(如 TI-RTOS)的任务调度代码、外部接口通信协议以及你的上层应用逻辑。
它们是如何协同工作的?(数据流向)
为了让你更直观地理解,你可以把我的内部工作流程看作一条高效的流水线:
- 配置指令: MSS 向 BSS 发送指令:“准备发射雷达波,请按照配置的参数执行”。
- 物理收发: BSS 控制天线发出电磁波,接收回波,并将其转换为数字化的 ADC 数据存入我的 L3 共享内存中。
- 信号处理: DSS 读取 ADC 数据,利用 DSP 和 HWA 进行快速的数学计算,提取出目标的距离、速度和角度信息,将“点云”结果放回共享内存。
- 高层逻辑与输出: MSS 拿到点云数据,运行目标追踪和聚类算法,最后通过 CAN-FD 或串口把结果发送给你的电脑或其他主控板。
SDK (Software Development Kit)
SoC (System on Chip): 片上系统
Texas Instruments Millimeter Wave Evaluation Module:TI mmWave EVM
CCS: Code Composer Studio
demo 文档查看
这个很有作用:It allows user to specify the chirping profile and displays the detected objects and other information in real-time.
demo 的路径:mmwave_sdk_<ver>/packages/ti/demo/<platform>/mmw
demo 说明文档路径:mmwave_sdk_/docs/mmwave_sdk_module_documentation.html
要加载两个:The demos have 2 executables - one for MSS and one for DSS which should be loaded concurrently for the demos to work.
载入镜像
模式选择:
Demonstration Mode
什么时候用:升级和部署;
bin 文件地址:mmwave_sdk_<ver>/packages/ti/demo/<platform>/<demo> /<platform>_<demo>.bin 记为 METAIMAGE1 ,这个文件烧录到开发板里面。
CCS development mode
什么时候用:频繁地修改和烧录的时候用;This mode allows you to flash once and then use CCS to download a different image to the device's RAM on every boot.
boot-up sequence (这个有点不太懂)
这句话不知道什么意思:When the mmWave device boots up in functional mode, the device bootloader starts executing and checks if a serial flash is attached to the device
运行 demo
主要demo:out-of-box mmWave demo
- 烧写对应的 bin 文件;
- 设置正确的模式 Functional Mode;
- 连接上电脑,找到 XDS110 (micro-USB port/cable);
主要是运行可视化程序:直接下载桌面版的应用,配置好串口
CFG_port = XDS110 Class Application/User UART 115200; 这个是所有 demo 命令行端口
Data_port = XDS110 Class Auxiliary Data port 921600; demo 中信号处理链路产生的二进制数据(包含检测目标列表、距离、多普勒、角度等)由这个口输出到 PC 上,波特率可调,最高 3125000,建议 1834000 或者 3125000
烧写相关
| SOP2 | SOP1 | SOP0 | Bootloader mode & operation |
|---|---|---|---|
| 0 | 0 | 1 | Functional Mode :Device Bootloader loads user application from QSPI Serial Flash to internal RAM and switches the control to it |
| 1 | 0 | 1 | Flash Programming Mode : Device Bootloader spins in loop to allow flashing of user application to the serial flash. |
这个网址可以云烧录: https://dev.ti.com/uniflash/ ,或者下载 uniflash 桌面版
For the SDK packaged demos and ccsdebug utility, there is a bin file provided in their respective folder: \mmwave_sdk_<ver>\ti\demo\mmw\<platform>_<demo|ccsdebug>_.bin which is the metaImage to be used for flashing. 这个 bin 文件包含了 MSS、BSS 和 DSS ,用什么模式烧什么 bin ,后面可以烧写自己的 bin 。
烧写串口:XDS110 Class Application/User UART ,断电操作让板子处于烧写模式 Flash Programming Mode ,烧写完了进入到 Functional Mode ;
可视化
For mmWave SDK 3.x (xWR16xx, xWR18xx, xWR64xx, xWR68xx, xWR68xx_AOP, xWR18xx_AOP), use :
https://dev.ti.com/gallery/view/mmwave/mmWave_Demo_Visualizer/ver/3.6.0/
要更新版本:mmWave SDK 3.3 以上的版本,3.3 和以前的数据口连接显示只有接收数据后才显示已连接
- 配置信息:
Configuretab 里面改参数和在Plot Selection勾选想要看到的图像;热力图帧率要小于 4 帧,要超过 25 帧最好选散点图和静态图; - 发送配置
SEND CONFIG TO MMWAVE DEVICE,发送完后去Plots标签页里面看图; - 改变
Plot Selection和Scene Selection重新发送配置就行,不用重启;动Setup Details重启加配置就行;
注意:不通过官方应用发送端口命令,就需要发送一次命令配置,然后就断开串口,想要再次发送就重新连接上,发完就断开结束会话;
GUI 内部运行
- 创建或读取一个配置命令,然后用串口(CLI)发送配置命令,11 页有配置信息格式;
- mmwave_sdk_<ver>\packages\ti\demo\<platform>\mmw\docs\doxygen\html\index.html 里面的
Output information sent to host小节里面有说 demo 输出数据的格式; - 每次重新配置先发送
sensorStop停止设备,然后发送flushCfg命令清洗掉旧配置(mandatory),所有命令都是 mandatory ;
进阶指令
LOAD CONFIG FROM PC AND SEND 发送自己的配置文件;
STOP 和 START 可以自己控制暂停和开始(遵循原来的配置)
RECORD START 可以记录处理或检测对象的数据,要设置大小和秒数,可以手动停止,mmwave_sdk_<ver>\packages\ti\demo\parser_scripts 里面有个解析脚本(python)mmw_demo_example_script.py 用到了 parser_mmw_demo.py 里面的 parser (解析器?),可以根据自己需求改脚本;As an example, the scripts dumps the point cloud from all the frames in an xls file.
PLAYBACK START 可以回忆 RECORD START 得到的数据,数据文件和配置文件要对上,要在板子不运行的时候用;
下面没看懂
Once the demo has started and plots are active, user can tune the demo using the "Real Time tuning tab" or "Advanced commands" tab and then save the tuned profile using "EXPORT TUNED PROFILE" button on the PLOTS tab.
控制台消息
发送命令就会回应,所有 assert conditions (感觉是判断)出现问题,就会返回对应的文件和行号;
又是输出复数错误码,参考 mmwave_sdk_<ver>\docs\mmwave_sdk_module_documentation.html
没看懂:Init time calibration status after the first sensorStart is issued post reboot for debugging boot time or start failures
LVDS 演示程序
以太网传输到电脑的流程
-
开发板 USB 连接 PC ,烧录对应的 demo.bin ,然后上电处于
Functional Mode,EVM 连接到 DCA1000 (参考 DCA1000 采集板说明文档 http://www.ti.com/lit/spruij4 )DCA1000 的 SW2.5(DCA1000 电源口的旁边的拨码开关)选择软件配置(左)还是硬件配置(右),软件配置是通过以太网口向 DCA1000 发送数据的。
-
用 mmWave Demo Visualizer 这个程序;
-
默认是不开启 LVDS 数据流的,导出配置(.cfg),在
lvdsStreamCfg里面使能对应的位,例子lvdsStreamCfg -1 1 1 1 -
创建 JSON 文件,直接复制
datacard_config.json里面的内容,JSON 文件要和配置文件相匹配;ethernetConfig根据自己自定义(不用动);- 在 .cfg 文件里面的
lvdsStreamCfg使能 <enableHeader> 这个位dataLoggingMode设置为 "raw" ,反之设置为 "multi"; - "lvdsMode":直接设置为 2 (since xwr16xx/xwr18xx/xwr68xx device have 2 lvds lanes)
- "dataFormatMode" 直接设置成 3 (3=2+1, "adcCfg" 里面的 "numADCBits" 只支持 16 bit,就是 2);
- "captureConfig" 自定义,"MSBToggle" = 0 ,"reorderEnable" = 1;
- "dataPortConfig" 设置为 "complex";
-
准备好 "datacard_config.json" ,在命令行下面执行命令
-
这个
DCA1000EVM_CLI_Control.exe软件在 mwave_studio_02_01_01_00\mmWaveStudio\PostProc 里面,复制到 "datacard_config.json" 同一个目录下,然后在文件夹的路径栏里面输出 cmd ;@REM configure DCA1000EVM DCA1000EVM_CLI_Control.exe fpga datacard_config.json @REM configure CLI application with the record related settings DCA1000EVM_CLI_Control.exe record datacard_config.json @REM start record and wait for the data over ethernet DCA1000EVM_CLI_Control.exe start_record datacard_config.json -
用前面可视化程序发送自己的配置,在命令行发送 "start_record" 30 秒内完成;
-
调用(invocation)成功了,串口发送的数据流在 Visualizer 里面显示,LVDS stream 保存到 JSON 文件的指定目录里面;
-
EVM 先停止,然后 DCA1000 才停止,反了会报错,问题不大;
DCA1000EVM_CLI_Control.exe stop_record datacard_config.json -
See section "Output Files" in C 这个部分没怎看懂
-
小端序(little endian):是指数据的高字节保存在内存的高地址中,而数据的低字节保存在内存的低地址中; <File_Prefix>_<Raw/Header Mode>_<iteration>.bin 是小端序;在小端字节序的 PC 上,16 位读取操作将直接读取正确数据,无需进行任何格式化处理。
- "raw" 直接保存数据,不加头信息;
-
lvds_example_script.py 这个脚本可以解析采样的数据,在 mwave_sdk_<ver>\packages\ti\demo\parser_scripts , 用到了
parser_lvds_demo_captured_file.py里面的模块。mmwave_sdk_<ver>\packages\ti\utils\hsiheader\test\data_card.cpp 是解析带 头(Header) 的 C 代码
配置文件格式
mmwave_sdk_<ver>\packages\ti\demo<platform>\mmw\profiles 里面有官方的配置文件,这个目录里面有个
.pl文件可以更新配置文件(没试过):@ Note that users will need to install perl on their machine(没版本要求) perl mmwDemo_xwr18xx_update_config.pl <your_cfg_file> @ output file: <your_cfg_file>_updated这句话有点不懂:Most of the parameters described below are the same as the mmwavelink API specifications(mmwave_sdk_<ver>\packages\ti\control\mmwavelink\docs\doxygen\html\index.html).
http://www.ti.com/litv/pdf/swra553 有相关雷达参数配置说明
测试模块 (.xer4f and .xe674)
用 CSS 下载和执行测试单元
-
How-To Articles (操作指南)
识别串口
识别 EVM 串口,会有两个口(XDS110 Class Application/User UART,XDS110 Class Auxiliary Data Port),看连接可视化程序那节,没有串口看看有没有安装驱动(用烧写程序也可以安装对应开发板的驱动)。
烧写相关
| SOP2 | SOP1 | SOP0 | Bootloader mode & operation |
|---|---|---|---|
| 0 | 0 | 1 | Functional Mode :Device Bootloader loads user application from QSPI Serial Flash to internal RAM and switches the control to it |
| 1 | 0 | 1 | Flash Programming Mode : Device Bootloader spins in loop to allow flashing of user application to the serial flash. |
这个网址可以云烧录: https://dev.ti.com/uniflash/ ,或者下载 uniflash 桌面版
For the SDK packaged demos and ccsdebug utility, there is a bin file provided in their respective folder: \mmwave_sdk_<ver>\ti\demo\mmw\<platform>_<demo|ccsdebug>_.bin which is the metaImage to be used for flashing. 这个 bin 文件包含了 MSS、BSS 和 DSS ,用什么模式烧什么 bin ,后面可以烧写自己的 bin 。
烧写串口:XDS110 Class Application/User UART ,断电操作让板子处于烧写模式 Flash Programming Mode ,烧写完了进入到 Functional Mode ;
擦除开发板 flash
找到这个 "Format SFLASH Button"
怎么用 JTAG 连接到 CCS
Debug/JTAG capability is available via the same XDS110 micro-USB port/cable on the EVM.
JTAG
Debug/JTAG capability is available via the same XDS110 micro-USB port/cable on the EVM.
参考 mmWave SDK 给出的信息更新 CCS 的设备支持包,再创建 ccxml 文件连接开发板。
CCXML (Target Configuration file for CCS) : CCS 的目标(开发板)配置文件
- 先创建一个 CCXML 文件

- 打开 View->Target Configurations 界面 右键 自己保存的配置,选择
Launch Selected Configuration,会启动设备的 Debug 窗口。会展示是所有的核心,右键想要连接的核心然后点击Connect Target

浙公网安备 33010602011771号