This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1642BOOST: 使用Automation.lua进行数据的自动采集

Part Number: IWR1642BOOST

您好,我最近尝试使用Automation.lua进行数据的自动采集工作。但是遇到了一些问题。

我在powershell中运行了此命令:

当命令开始执行时,mmWaveStudio被自动唤醒,在Connection此栏下完成了一系列的连接,但是似乎RF Powered-up未被正确执行。此时我发现下方是Stop:

此时,我未进行任何操作,等待一一段时间后,Stop变成了Run:

但是,mmWaveStudio未进行任何其他的工作,也未曾向下执行,我也没有得到任何的数据。所以,想请教一下,为何没能实现数据的自动采集?或者我有做的不正确的地方?

下方是Automation.lua中的内容:

---------------------------------- STARTUP -------------------------------------
------------------------ DO NOT MODIFY THIS SECTION ----------------------------

-- mmwavestudio installation path
RSTD_PATH = RSTD.GetRstdPath()

-- Declare the loading function
dofile(RSTD_PATH .. "\\Scripts\\Startup.lua")

------------------------------ CONFIGURATIONS ----------------------------------
-- Use "DCA1000" for working with DCA1000
capture_device = "DCA1000"

-- SOP mode
SOP_mode = 2

-- RS232 connection baud rate
baudrate = 115200
-- RS232 COM Port number
uart_com_port = 10
-- Timeout in ms
timeout = 1000

-- BSS firmware
bss_path = "C:\\ti\\mmwave_studio_02_01_00_00\\rf_eval_firmware\\radarss\\xwr16xx_radarss.bin"
-- MSS firmware
mss_path = "C:\\ti\\mmwave_studio_02_01_00_00\\rf_eval_firmware\\masterss\\xwr16xx_masterss.bin"

adc_data_path = "C:\\ti\\mmwave_studio_02_01_00_00\\mmWaveStudio\\PostProc\\test_data.bin"

------------------------- Connect Tab settings ---------------------------------
-- Select Capture device
ret=ar1.SelectCaptureDevice(capture_device)
if(ret~=0)
then
print("******* Wrong Capture device *******")
return
end

-- SOP mode
ret=ar1.SOPControl(SOP_mode)
RSTD.Sleep(timeout)
if(ret~=0)
then
print("******* SOP FAIL *******")
return
end

-- RS232 Connect
ret=ar1.Connect(uart_com_port,baudrate,timeout)
RSTD.Sleep(timeout)
if(ret~=0)
then
print("******* Connect FAIL *******")
return
end

-- Download BSS Firmware
ret=ar1.DownloadBSSFw(bss_path)
RSTD.Sleep(2*timeout)
if(ret~=0)
then
print("******* BSS Load FAIL *******")
return
end

-- Download MSS Firmware
ret=ar1.DownloadMSSFw(mss_path)
RSTD.Sleep(2*timeout)
if(ret~=0)
then
print("******* MSS Load FAIL *******")
return
end

-- SPI Connect
ar1.PowerOn(1, 1000, 0, 0)

-- RF Power UP
ar1.RfEnable()

------------------------- Other Device Configuration ---------------------------

-- ADD Device Configuration here

ar1.ChanNAdcConfig(1, 1, 0, 1, 1, 1, 1, 2, 1, 0)

ar1.LPModConfig(0, 0)

ar1.RfInit()
RSTD.Sleep(1000)

ar1.DataPathConfig(1, 1, 0)

ar1.LvdsClkConfig(1, 1)

ar1.LVDSLaneConfig(0, 1, 1, 1, 1, 1, 0, 0)

ar1.SetTestSource(4, 3, 0, 0, 0, 0, -327, 0, -327, 327, 327, 327, -2.5, 327, 327, 0, 0, 0, 0, -327, 0, -327,
327, 327, 327, -95, 0, 0, 0.5, 0, 1, 0, 1.5, 0, 0, 0, 0, 0, 0, 0)

ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 0, 30)

ar1.ChirpConfig(0, 0, 0, 0, 0, 0, 0, 1, 1, 0)

ar1.EnableTestSource(1)

ar1.FrameConfig(0, 0, 8, 128, 40, 0, 0, 1)

ar1.CaptureCardConfig_EthInit("192.168.33.30", "192.168.33.180", "12:34:56:78:90:12", 4096, 4098)

ar1.CaptureCardConfig_Mode(1, 1, 1, 2, 3, 30)

ar1.CaptureCardConfig_PacketDelay(25)

--Start Record ADC data
ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)
RSTD.Sleep(1000)

--Trigger frame
ar1.StartFrame()
RSTD.Sleep(5000)

------------------------- Close the Connection ---------------------------------
-- SPI disconnect
ar1.PowerOff()

-- RS232 disconnect
ar1.Disconnect()

------------------------- Exit MMwave Studio GUI -----------------------------------
os.exit()

-- end