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.

AWR2243: Run Customized Lua file without mmwave.exe for AWR2243 and DCA1000.

Part Number: AWR2243

Hello ,

I have AWR2243 and also DCA1000.I want to develop my own application On windows 10 OS in a Qt application based that config AW2243 lua files from command for example .if I have installed mingw and also lua 5.4 .Can I run Run  mmwave studio Lua files which placed in Scripts directory without Running mmwStudio.exe .for example lua Startup.lua in cmd??Can I have my own customized Lua file that does not need run mmwaveStudio??

my Test.Lua file:

--BSS and MSS firmware download
info = debug.getinfo(1,'S');
file_path = (info.source);
file_path = string.gsub(file_path, "@","");
file_path = string.gsub(file_path, "Test1_AWR2243.lua","");
fw_path = file_path.."..\\..\\rf_eval_firmware\\AWR2243_ES1_1"

--Export bit operation file
--bitopfile = file_path.."\\".."bitoperations.lua"
bitopfile = file_path.."\\".."bitoperations.lua"
dofile(bitopfile)

-- reset control
if (0 == ar1.SOPControl(2)) then
WriteToLog("SOP Reset Success\n", "green")
else
WriteToLog("SOP Reset Failure\n", "red")
end

-- Rs232 Connect
if (0 == ar1.Connect(5,115200,1000)) then
WriteToLog("RS232 Connect Success\n", "green")
else
WriteToLog("RS232 Connect Failure\n", "red")
end

RSTD.Sleep(1000)

--Read part ID
--This register address used to find part number for ES devices
res, efusedevice = ar1.ReadRegister(0xFFFFE214, 0, 31)
res, efuseES1device = ar1.ReadRegister(0xFFFFE210, 0, 31)
efuseES2ES3Device = bit_and(efusedevice, 0x03FC0000)
efuseES2ES3Device = bit_rshift(efuseES2ES3Device, 18)

init_config = true
desiredSourceIP = "192.168.33.30"
desiredDestinationIP = "192.168.33.180"
macAddress = "12:34:56:78:90:12"
dataPort = 4098
controlPort = 4096

--if part number is zero then those are ES1 devices
-- if(efuseES2ES3Device == 0 or efuseES2ES3Device == 0x20 or efuseES2ES3Device == 0x21 or efuseES2ES3Device == 0x80) then
-- partId = 1243
-- else
-- WriteToLog("Inavlid Device part number in ES2 and ES3 devices\n" ..partId)
-- end


--ES version
res, ESVersion = ar1.ReadRegister(0xFFFFE218, 0, 31)
ESVersion = bit_and(ESVersion, 15)

-- --ADC_Data file and Raw file and PacketReorder utitlity log file path
-- data_path = file_path.."..\\PostProc"
-- adc_data_path = data_path.."\\adc_data.bin"
-- Raw_data_path = data_path.."\\adc_data_Raw_0.bin"
-- pkt_log_path = data_path.."\\pktlogfile.txt"

-- Download Firmware
BSS_FW = fw_path.."\\radarss\\xwr22xx_radarss.bin"
MSS_FW = fw_path.."\\masterss\\xwr22xx_masterss.bin"


-- Download BSS Firmware(AR22xx)
if (ar1.DownloadBSSFw(BSS_FW) == 0) then
WriteToLog("BSS FW Download Success\n", "green")
else
WriteToLog("BSS FW Download failure\n", "red")
end
RSTD.Sleep(2000)

-- Download MSS Firmware
if (ar1.DownloadMSSFw(MSS_FW) == 0) then
WriteToLog("MSS FW Download Success\n", "green")
else
WriteToLog("MSS FW Download failure\n", "red")
end
RSTD.Sleep(2000)

-- SPI Connect
if (ar1.PowerOn(1, 1000, 0, 0) == 0) then
WriteToLog("Power On Success\n", "green")
else
WriteToLog("Power On failure\n", "red")
end
RSTD.Sleep(1000)

-- RF Power UP
if (ar1.RfEnable() == 0) then
WriteToLog("RF Enable Success\n", "green")
else
WriteToLog("RF Enable failure\n", "red")
end
RSTD.Sleep(1000)

-- Static Config
if (ar1.ChanNAdcConfig(1, 1, 0, 1, 1, 1, 1, 2, 1, 0) == 0) then
WriteToLog("ChanNAdcConfig Success\n", "green")
else
WriteToLog("ChanNAdcConfig failure\n", "red")
end
RSTD.Sleep(1000)

if (ar1.LPModConfig(0, 0) == 0) then
WriteToLog("Regualar mode Cfg Success\n", "green")
else
WriteToLog("Regualar mode Cfg failure\n", "red")
end
RSTD.Sleep(2000)

if (ar1.RfInit() == 0) then
WriteToLog("RfInit Success\n", "green")
else
WriteToLog("RfInit failure\n", "red")
end
RSTD.Sleep(1000)


--Data Config

if (ar1.DataPathConfig(1, 1, 0) == 0) then
WriteToLog("DataPathConfig Success\n", "green")
else
WriteToLog("DataPathConfig failure\n", "red")
end
RSTD.Sleep(1000)

if (ar1.LvdsClkConfig(1, 1) == 0) then
WriteToLog("LvdsClkConfig Success\n", "green")
else
WriteToLog("LvdsClkConfig failure\n", "red")
end
RSTD.Sleep(1000)

if (ar1.LVDSLaneConfig(0, 1, 1, 1, 1, 1, 0, 0) == 0) then
WriteToLog("LVDSLaneConfig Success\n", "green")
else
WriteToLog("LVDSLaneConfig failure\n", "red")
end
RSTD.Sleep(1000)


--Sensor Config

if(ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 0, 30) == 0) then
WriteToLog("ProfileConfig Success\n", "green")
else
WriteToLog("ProfileConfig failure\n", "red")
end
RSTD.Sleep(1000)

if (ar1.ChirpConfig(0, 0, 0, 0, 0, 0, 0, 1, 1, 0) == 0) then
WriteToLog("ChirpConfig Success\n", "green")
else
WriteToLog("ChirpConfig failure\n", "red")
end
RSTD.Sleep(1000)

if (ar1.FrameConfig(0, 0, 0, 1, 1, 0, 1) == 0) then
WriteToLog("FrameConfig Success\n", "green")
else
WriteToLog("FrameConfig failure\n", "red")
end
RSTD.Sleep(1000)


-- select Device type
if (ar1.SelectCaptureDevice("DCA1000") == 0) then
WriteToLog("SelectCaptureDevice Success\n", "green")
else
WriteToLog("SelectCaptureDevice failure\n", "red")
end
RSTD.Sleep(1000)

--DATA CAPTURE CARD API
if (ar1.CaptureCardConfig_EthInit(desiredSourceIP, desiredDestinationIP, macAddress , controlPort, dataPort) == 0) then
WriteToLog("CaptureCardConfig_EthInit Success\n", "green")
else
WriteToLog("CaptureCardConfig_EthInit failure\n", "red")
end
RSTD.Sleep(1000)

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

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

Thanks.