2020/5/19

DCA1000 - Command Line Tool

TI 提供command line tool 經由 UDP Command 控制 DCA1000,
這個 command tool (DCA1000EVM_CLI_CONTROL.exe) 要在 mmwave studio 2.1 板才有。
STUDIO_INSTALL_PATH\mmWaveStudio\PostProc 下。
文件在 STUDIO_INSTALL_PATH\mmWaveStudio\ReferenceCode\DCA1000\Docs 下:
  • TI_DCA1000EVM_CLI_Software_DeveloperGuide.pdf
  • TI_DCA1000EVM_CLI_Software_UserGuide.pdf
簡單測試,先從 User Guide 開始。

DCA1000EVM_CLI_CONTROL 的執行格式是:
DCA1000EVM_CLI_CONTROL command cfg.json
最重要的就是 cfg.json 這個檔案,裡面有所有設定 (LVDS plane, DCA1000 IP address...etc)
EsonJohn mmWave_scriptM 裡面有 cfg.json 這個 json file 的範例。

DCA1000EVM_CLI_Control help:
fpga                            Configure FPGA
eeprom                          Update EEPROM
reset_fpga                      Reset FPGA
reset_ar_device                 Reset AR Device
start_record                    Start Record
stop_record                     Stop Record
record                          Configure Record delay
dll_version                     Read DLL version
cli_version                     Read CLI_Control tool version
fpga_version                    Read FPGA version
query_status                    Read status of record process
query_sys_status                DCA1000EVM System aliveness
-h                              List of commands supported
-q                              Quiet mode - No status display in the console
DCA1000EVM and AWR1642BOOST board setup
在使用這個命令之前,DCA1000 的 Dip SW 要 configure 成 SW_CONFIG
PC 和 DCA1000EVM 使用網路連接,同時 PC 端網路要設為 static IP : 192.168.33.30

開機上電之後..
C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\PostProc>DCA1000EVM_CLI_Control.exe fpga_version cf.json


FPGA Version : 2.7 [Record]
* cf.json 就是上面github project 內的。

要record data,要先設定 AWR1642BOOT,開使從 LVDS output ADC Data。
利用 mmwave demo visualizer 設定好,save configuration...下面是 best ranage resolution 的 config:
sensorStop
flushCfg
dfeDataOutputMode 1
channelCfg 15 3 0
adcCfg 2 1
adcbufCfg -1 0 0 1 0
profileCfg 0 77 429 7 57.14 0 0 70 1 256 5209 0 0 30
chirpCfg 0 0 0 0 0 0 0 1
chirpCfg 1 1 0 0 0 0 0 2
frameCfg 0 1 16 0 100 1 0
lowPower 0 1
guiMonitor -1 1 1 0 0 0 1
cfarCfg -1 0 0 8 4 4 0 5120
cfarCfg -1 1 0 4 2 3 0 5120
peakGrouping -1 1 1 1 1 255
multiObjBeamForming -1 1 0.5
clutterRemoval -1 0
calibDcRangeSig -1 0 -5 8 256
extendedMaxVelocity -1 0
bpmCfg -1 0 0 1
lvdsStreamCfg -1 0 1 0
nearFieldCfg -1 0 0 0
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
measureRangeBiasAndRxChanPhase 0 1.5 0.2
CQRxSatMonitor 0 3 5 123 0
CQSigImgMonitor 0 127 4
analogMonitor 1 1
sensorStart
要enable LVDS output的話,要修改一下 lvfdsStreamCfg 的參數,第三個要是 1:
lvdsStreamCfg -1 0 1 0
用 TeraTerm 連上 AWR1642BOOST後,把上面 command copy 下來 (修改 lvdsStreamCfg) ,一次送出給 AWR1642BOOT。
之後,對 DCA1000 下 command:
C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\PostProc>DCA1000EVM_CLI_Control.exe fpga cf.json

FPGA Configuration command : Success

C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\PostProc>DCA1000EVM_CLI_Control.exe start_record cf.json

Start Record command : Success
可以看到開啟一個新視窗..start record...
並且可以看到 DCA1000EVB 的第一顆 LED 閃爍。
代表 UDP 開始傳送...

之後,可以用 DCA1000EVM_CLI_CONTROL stop_record cf1.json 停止,
或是對 AWR1642BOOST 下 sensorStop 來停止 record.

cf.json 中.. 有指定 log data 的 path:
    "captureConfig": {
      "fileBasePath": ".\\Data\\",
.. 所以這個path 要先 create 好..
在裡面可以看到...
  • adc_data_Raw_0.bin
  • adc_data_Raw_LogFile.csv
有關廚存檔案的內容格式,這一篇:DCA1000EVM: Raw mode data format. How is the raw mode data ordered? 有題到:
Hi,

Alternative 2 looks right for complex data.

If you are able to capture, process with mmWave and look at packets with Wireshark.

A great exercise to determine the data format, would be to :

capture and process data
View binary data captured with header information, my case located C:\ti\mmwave_studio_02_00_00_02\mmWaveStudio\PostProc\adc_data_Raw_0.bin
View binary data captured without header information, my case located C:\ti\mmwave_studio_02_00_00_02\mmWaveStudio\PostProc\adc_data.bin
and compare the 2 files above along with the data captured with Wireshark.
A document that might help is Mmwave Radar Device ADC Raw Data Capture, look at section 5 on page 7 and 8.

Alex

或是看文件 SWRA581B : mmWave Radar Device ADC Raw Data Capture.pdf

沒有留言:

張貼留言