Hi there,
I have tried to automatize the configuration process of the AWR1243-DCA1000EVM boards following the LUA output obtained when the configuration is done manually. However, even if I do not get any error, the Matlab interface does not show the recorded data as it does when I do a manual configuration. I think the problem might be in a hidden command when Matlab is run that is not output on LUA script.
I have attached the script I am using. Thank you in advance!
--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, "DataCaptureDemo_xWR.lua",""); fw_path = file_path.."..\\..\\rf_eval_firmware" partId = 1243 --ES version --res, ESVersion = ar1.ReadRegister(0xFFFFE218, 0, 31) ESVersion = 2 --ADC_Data file and Raw file and PacketReorder utitlity log file path data_path = "C:\\ti\\mmwave_studio_01_00_00_00\\mmWaveStudio\\PostProc" adc_data_path = "C:\\ti\\mmwave_studio_01_00_00_00\\mmWaveStudio\\PostProc\\adc_data.bin" Raw_data_path = "C:\\ti\\mmwave_studio_01_00_00_00\\mmWaveStudio\\PostProc\\adc_data_Raw_0.bin" pkt_log_path = "C:\\ti\\mmwave_studio_01_00_00_00\\mmWaveStudio\\PostProc\\pktlogfile.txt" RSTD.Sleep(2000) ar1.FullReset() RSTD.Sleep(2000) ar1.SOPControl(2) RSTD.Sleep(2000) ar1.Connect(3,115200,1000) RSTD.Sleep(2000) ar1.Calling_IsConnected() RSTD.Sleep(2000) ar1.SelectChipVersion("XWR1243") RSTD.Sleep(2000) -- Download BSS Firmware(AR16xx) BSS_FW = "C:\\ti\\mmwave_studio_01_00_00_00\\rf_eval_firmware\\radarss\\xwr12xx_xwr14xx_radarss_ES2.0.bin" MSS_FW = "C:\\ti\\mmwave_studio_01_00_00_00\\rf_eval_firmware\\masterss\\xwr12xx_xwr14xx_masterss_ES2.0.bin" -- Download BSS Firmware(AR16xx) ar1.DownloadBSSFw(BSS_FW) --WriteToLog("BSS FW Download Success\n", "green") RSTD.Sleep(2000) -- Download MSS Firmware ar1.DownloadMSSFw(MSS_FW) --WriteToLog("MSS FW Download Success\n", "green") -- SPI Connect ar1.PowerOn(0, 1000, 0, 0) --WriteToLog("Power On Success\n", "green") RSTD.Sleep(1000) -- RF Power UP ar1.RfEnable() --WriteToLog("RF Enable Success\n", "green") RSTD.Sleep(1000) ar1.ChanNAdcConfig(1, 1, 0, 1, 1, 1, 1, 2, 2, 0) --WriteToLog("ChanNAdcConfig Success\n", "green") RSTD.Sleep(1000) ar1.LPModConfig(0, 0) --WriteToLog("Regualar mode Cfg Success\n", "green") RSTD.Sleep(2000) ar1.RfInit() --WriteToLog("RfInit Success\n", "green") RSTD.Sleep(1000) ar1.DataPathConfig(513, 1216644097, 0) --WriteToLog("DataPathConfig Success\n", "green") RSTD.Sleep(1000) ar1.LvdsClkConfig(1, 1) --WriteToLog("LvdsClkConfig Success\n", "green") RSTD.Sleep(1000) ar1.LVDSLaneConfig(0, 1, 1, 1, 1, 1, 0, 0) --WriteToLog("LVDSLaneConfig Success\n", "green") RSTD.Sleep(1000) -- select Device type ar1.SelectCaptureDevice("DCA1000") --WriteToLog("SelectCaptureDevice Success\n", "green") RSTD.Sleep(1000) --DATA CAPTURE CARD API ar1.CaptureCardConfig_EthInit("192.168.33.30", "192.168.33.180", "12:34:56:78:90:12", 4096, 4098) --WriteToLog("CaptureCardConfig_EthInit Success\n", "green") RSTD.Sleep(1000) ar1.CaptureCardConfig_Mode(1, 1, 1, 2, 3, 0) --WriteToLog("CaptureCardConfig_Mode Success\n", "green") RSTD.Sleep(1000) ar1.CaptureCardConfig_PacketDelay(25) --WriteToLog("CaptureCardConfig_PacketDelay Success\n", "green") RSTD.Sleep(1000) ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 0, 30) --WriteToLog("ProfileConfig Success\n", "green") RSTD.Sleep(1000) ar1.ChirpConfig(0, 0, 0, 0, 0, 0, 0, 1, 0, 0) --WriteToLog("ChirpConfig Success\n", "green") RSTD.Sleep(1000) ar1.DisableTestSource(0) RSTD.Sleep(1000) ar1.FrameConfig(0, 0, 20, 128, 50, 0, 1) --WriteToLog("FrameConfig Success\n", "green") RSTD.Sleep(1000) --Start Record ADC data ar1.CaptureCardConfig_StartRecord(adc_data_path, 1) RSTD.Sleep(1000) --Trigger frame ar1.StartFrame() RSTD.Sleep(2000) -- Stop Recording ar1.CaptureCardConfig_StopRecord() RSTD.Sleep(1000) --Packet reorder utility processing the Raw_ADC_data --WriteToLog("Please wait for a few seconds for Packet reorder utility processing .....!!!! \n", "green") ar1.PacketReorderZeroFill(Raw_data_path, adc_data_path, pkt_log_path)
RSTD.Sleep(10000) --WriteToLog("Packet reorder utility processing done.....!!!! \n", "green") --Post process the Capture RAW ADC data ar1.StartMatlabPostProc(adc_data_path) --WriteToLog("Please wait for a few seconds for matlab post processing .....!!!! \n", "green")