TI中文支持网
TI专业的中文技术问题搜集分享网站

AWR6843AOPEVM: 运行DataCaptureDemo_xWR.lua脚本时报错

Part Number:AWR6843AOPEVMOther Parts Discussed in Thread: IWR6843AOP

您好,我们在运行DataCaptureDemo_xWR.lua脚本时出现如下报错,请问是什么原因呢?

[15:30:59] LuaLoad("C:/ti/mmwave_studio_02_01_01_00/mmWaveStudio/Scripts/DataCaptureDemo_xWR.lua")
[15:31:00] [RadarAPI]: Opening Board Control Port()
[15:31:00] [RadarAPI]: Status: Passed
[15:31:01] [RadarAPI]: ar1.FullReset()
[15:31:01] [RadarAPI]: Status: Passed
[15:31:01] [RadarAPI]: Closing Board Control Port()
[15:31:01] [RadarAPI]: Status: Passed
[15:31:01] [RadarAPI]: Opening Gpio Control Port()
[15:31:01] [RadarAPI]: Status: Passed
[15:31:02] [RadarAPI]: Opening Board Control Port()
[15:31:02] [RadarAPI]: Status: Passed
[15:31:03] [RadarAPI]: ar1.FullReset()
[15:31:03] [RadarAPI]: Status: Passed
[15:31:03] [RadarAPI]: Closing Board Control Port()
[15:31:03] [RadarAPI]: Status: Passed
[15:31:03] [RadarAPI]: Closing Gpio Control Port()
[15:31:03] [RadarAPI]: Status: Passed
[15:31:03] [RadarAPI]: ar1.SOPControl(2)
[15:31:03] [RadarAPI]: Status: Passed
[15:31:03] [RadarAPI]: ar1.Connect(5,115200,1000)
[15:31:04] [RadarAPI]: ar1.Calling_IsConnected()
[15:31:06] Device Status : UnDetDe/ASIL-B/SOP:2/ES:2
[15:31:06] [RadarAPI]: ar1.ReadRegister(0xffffe214, 0, 31)
[15:31:06] [RadarAPI]: ar1.ReadRegister(0xffffe210, 0, 31)
[15:31:06][15:31:06] &&&&&&&&&&&&&&&&&&&&
[15:31:06] ***Script FAILED!***
[15:31:06] &&&&&&&&&&&&&&&&&&&&
[15:31:06] Exception message is:
[15:31:06] …1_01_00\mmWaveStudio\Scripts\DataCaptureDemo_xWR.lua:51: attempt to concatenate global 'partId' (a nil value)

Mi He:

现在运行后界面如图所示,SPI的连接未成功。

脚本应该是没有成功从寄存器中读到数据,不能得到partId的值,不知道应该如何修改了

,

Mi He:

DataCaptureDemo_xWR.lua脚本代码如下:

ar1.FullReset()
ar1.SOPControl(2)
ar1.Connect(5,115200,1000)--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"--Export bit operation file
bitopfile = file_path.."\\".."bitoperations.lua"
dofile(bitopfile)--Read part ID
--This register address used to find part number for ES2 and ES3 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)--if part number is zero then those are ES1 devicesif(efuseES2ES3Device == 0) thenif (bit_and(efuseES1device, 3) == 0) thenpartId = 1243elseif (bit_and(efuseES1device, 3) == 1) thenpartId = 1443elsepartId = 1642end
elseif(efuseES2ES3Device == 0xE0 and (bit_and(efuseES1device, 3) == 2)) thenpartId = 6843ar1.frequencyBandSelection("60G")
--if part number is non-zero then those are ES12 and ES3 devices
elseif(efuseES2ES3Device == 0x20 or efuseES2ES3Device == 0x21 or efuseES2ES3Device == 0x80) thenpartId = 1243elseif(efuseES2ES3Device == 0xA0 or efuseES2ES3Device == 0x40)thenpartId = 1443elseif(efuseES2ES3Device == 0x60 or efuseES2ES3Device == 0x61 or efuseES2ES3Device == 0x04 or efuseES2ES3Device == 0x62 or efuseES2ES3Device == 0x67) thenpartId = 1642elseif(efuseES2ES3Device == 0x66 or efuseES2ES3Device == 0x01 or efuseES2ES3Device == 0xC0 or efuseES2ES3Device == 0xC1) thenpartId = 1642elseif(efuseES2ES3Device == 0x70 or efuseES2ES3Device == 0x71 or efuseES2ES3Device == 0xD0 or efuseES2ES3Device == 0x05) thenpartId = 1843elseif(efuseES2ES3Device == 0xE0 or efuseES2ES3Device == 0xE1 or efuseES2ES3Device == 0xE2 or efuseES2ES3Device == 0xE3 or efuseES2ES3Device == 0xE4) thenpartId = 6843ar1.frequencyBandSelection("60G")elseWriteToLog("Inavlid Device part number in ES2 and ES3 devices\n" ..partId)end
end--ES version
res, ESVersion = ar1.ReadRegister(0xFFFFE218, 0, 31)
ESVersion = bit_and(ESVersion, 15)--ADC_Data file path
--data_path= file_path.."..\\PostProc"
--adc_data_path = data_path.."\\adc_data.bin"
data_path= "D:\\RadarProcessing\\DataFile\\TestData"
adc_data_path = "D:\\RadarProcessing\\DataFile\\TestData\\adc_data.bin"
-- Path above mentioned can be changed according to your requirements-- Download Firmware
if(partId == 1642) thenBSS_FW= fw_path.."\\radarss\\xwr16xx_radarss.bin"MSS_FW= fw_path.."\\masterss\\xwr16xx_masterss.bin"
elseif(partId == 1243) thenBSS_FW= fw_path.."\\radarss\\xwr12xx_xwr14xx_radarss.bin"MSS_FW= fw_path.."\\masterss\\xwr12xx_xwr14xx_masterss.bin"
elseif(partId == 1443) thenBSS_FW= fw_path.."\\radarss\\xwr12xx_xwr14xx_radarss.bin"MSS_FW= fw_path.."\\masterss\\xwr12xx_xwr14xx_masterss.bin"
elseif(partId == 1843) thenBSS_FW= fw_path.."\\radarss\\xwr18xx_radarss.bin"MSS_FW= fw_path.."\\masterss\\xwr18xx_masterss.bin"
elseif(partId == 6843) thenBSS_FW= fw_path.."\\radarss\\xwr68xx_radarss.bin"MSS_FW= fw_path.."\\masterss\\xwr68xx_masterss.bin"
elseWriteToLog("Invalid Device partId FW\n" ..partId)WriteToLog("Invalid Device ESVersion\n" ..ESVersion)
end-- Download BSS Firmware
if (ar1.DownloadBSSFw(BSS_FW) == 0) thenWriteToLog("BSS FW Download Success\n", "green")
elseWriteToLog("BSS FW Download failure\n", "red")
end-- Download MSS Firmware
if (ar1.DownloadMSSFw(MSS_FW) == 0) thenWriteToLog("MSS FW Download Success\n", "green")
elseWriteToLog("MSS FW Download failure\n", "red")
end-- SPI Connect
if (ar1.PowerOn(1, 1000, 0, 0) == 0) thenWriteToLog("Power On Success\n", "green")
elseWriteToLog("Power On failure\n", "red")
end-- RF Power UP
if (ar1.RfEnable() == 0) thenWriteToLog("RF Enable Success\n", "green")
elseWriteToLog("RF Enable failure\n", "red")
endif (ar1.ChanNAdcConfig(1, 1, 0, 1, 1, 1, 1, 2, 1, 0) == 0) thenWriteToLog("ChanNAdcConfig Success\n", "green")
elseWriteToLog("ChanNAdcConfig failure\n", "red")
endif (partId == 1642) thenif (ar1.LPModConfig(0, 1) == 0) thenWriteToLog("LPModConfig Success\n", "green")elseWriteToLog("LPModConfig failure\n", "red")end
elseif (ar1.LPModConfig(0, 0) == 0) thenWriteToLog("Regualar mode Cfg Success\n", "green")elseWriteToLog("Regualar mode Cfg failure\n", "red")end
endif (ar1.RfInit() == 0) thenWriteToLog("RfInit Success\n", "green")
elseWriteToLog("RfInit failure\n", "red")
endRSTD.Sleep(1000)if (ar1.DataPathConfig(1, 1, 0) == 0) thenWriteToLog("DataPathConfig Success\n", "green")
elseWriteToLog("DataPathConfig failure\n", "red")
endif (ar1.LvdsClkConfig(1, 1) == 0) thenWriteToLog("LvdsClkConfig Success\n", "green")
elseWriteToLog("LvdsClkConfig failure\n", "red")
endif((partId == 1642) or (partId == 1843) or (partId == 6843)) thenif (ar1.LVDSLaneConfig(0, 1, 1, 0, 0, 1, 0, 0) == 0) thenWriteToLog("LVDSLaneConfig Success\n", "green")elseWriteToLog("LVDSLaneConfig failure\n", "red")end
elseif ((partId == 1243) or (partId == 1443)) thenif (ar1.LVDSLaneConfig(0, 1, 1, 1, 1, 1, 0, 0) == 0) thenWriteToLog("LVDSLaneConfig Success\n", "green")elseWriteToLog("LVDSLaneConfig failure\n", "red")end
endif (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) == 0) thenWriteToLog("Test Source Configuration Success\n", "green")
elseWriteToLog("Test Source Configuration failure\n", "red")
endif((partId == 1642) or (partId == 1843)) thenif(ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 5000, 0, 0, 30) == 0) thenWriteToLog("ProfileConfig Success\n", "green")elseWriteToLog("ProfileConfig failure\n", "red")end
elseif((partId == 1243) or (partId == 1443)) thenif(ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 0, 30) == 0) thenWriteToLog("ProfileConfig Success\n", "green")elseWriteToLog("ProfileConfig failure\n", "red")end
elseif(partId == 6843) thenif(ar1.ProfileConfig(0, 60.25, 100, 6, 60, 0, 0, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 131072, 30) == 0) thenWriteToLog("ProfileConfig Success\n", "green")elseWriteToLog("ProfileConfig failure\n", "red")end
endif (ar1.ChirpConfig(0, 0, 0, 0, 0, 0, 0, 1, 1, 0) == 0) thenWriteToLog("ChirpConfig Success\n", "green")
elseWriteToLog("ChirpConfig failure\n", "red")
endif (ar1.EnableTestSource(1) == 0) thenWriteToLog("Enabling Test Source Success\n", "green")
elseWriteToLog("Enabling Test Source failure\n", "red")
endif (ar1.FrameConfig(0, 0, 8, 128, 40, 0, 0, 1) == 0) thenWriteToLog("FrameConfig Success\n", "green")
elseWriteToLog("FrameConfig failure\n", "red")
end-- select Device type
if (ar1.SelectCaptureDevice("DCA1000") == 0) thenWriteToLog("SelectCaptureDevice Success\n", "green")
elseWriteToLog("SelectCaptureDevice failure\n", "red")
end--DATA CAPTURE CARD API
if (ar1.CaptureCardConfig_EthInit("192.168.33.30", "192.168.33.180", "12:34:56:78:90:12", 4096, 4098) == 0) thenWriteToLog("CaptureCardConfig_EthInit Success\n", "green")
elseWriteToLog("CaptureCardConfig_EthInit failure\n", "red")
end--AWR12xx or xWR14xx-1, xWR16xx or xWR18xx or xWR68xx- 2 (second parameter indicates the device type)
if ((partId == 1642) or (partId == 1843) or (partId == 6843)) thenif (ar1.CaptureCardConfig_Mode(1, 2, 1, 2, 3, 30) == 0) thenWriteToLog("CaptureCardConfig_Mode Success\n", "green")elseWriteToLog("CaptureCardConfig_Mode failure\n", "red")end
elseif ((partId == 1243) or (partId == 1443)) thenif (ar1.CaptureCardConfig_Mode(1, 1, 1, 2, 3, 30) == 0) thenWriteToLog("CaptureCardConfig_Mode Success\n", "green")elseWriteToLog("CaptureCardConfig_Mode failure\n", "red")end
endif (ar1.CaptureCardConfig_PacketDelay(25) == 0) thenWriteToLog("CaptureCardConfig_PacketDelay Success\n", "green")
elseWriteToLog("CaptureCardConfig_PacketDelay failure\n", "red")
end--Start Record ADC data
ar1.CaptureCardConfig_StartRecord(adc_data_path, 1)
RSTD.Sleep(1000)--Trigger frame
ar1.StartFrame()
RSTD.Sleep(5000)--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")
RSTD.Sleep(10000)

,

Shine:

请看一下Quick Start Guide里的步骤7 Issue a board reset and connect the RS232 COM port,是否在执行DataCapturedemo_xWR.lua前复位一下板子?https://www.ti.com/lit/ml/spruik7/spruik7.pdf

,

Mi He:

您好,我在其他地方发表的帖子收到的回复,建议我查看一下我所使用的板子所烧录的固件版本是E1还是E2/E3,请问怎样查看所烧录的固件版本呢?

,

Shine:

BSS FW, MSS FW是在板子连接上后下载到芯片上的,不是事先烧写好的。

,

Mi He:

是的,但是固件版本是指的什么,我看在DataCapturedemo_xWR.lua文件里也有判断固件版本的语句

,

Mi He:

您好,我在连接SPI的时候还遇到这样的问题,是因为没有复位板子吗?

[15:01:50] [RadarAPI]: ar1.PowerOn(0, 1000, 0, 0)[15:01:50] Status: Failed, Error Type: RESP TIMEOUT[15:01:54] MSS Power Up async event was not received!

,

Mi He:

请问一下怎样复位板子?

,

Mi He:

您好,我按照您所发文档进行操作了,但是我仍然出现不能正确读出pratId的问题。

在运行DataCapturedemo_xWR.lua脚本的这段语句中:

我读出来的efuseES2ES3Device的值是243:

并不能对应找出pratId

所以一直报错为:

请问这是什么原因,有什么解决方法吗?期待您的及时回复。

,

Shine:

请问您的AWR6843AOPEVM是REV F版本还是REV G版本?

,

Mi He:

您好,我们的AWR6843AOPEVM是REV F版本

,

Mi He:

您好,我已经按照您所提供的文档DCA1000EVM Quick Start Guide (ti.com)进行了操作了,还是出现同样的报错,希望您能提供一下不能找出partId的解决方法。

,

Shine:

能否发一下板子的连接图,看一下拨位开关的配置。

,

Mi He:

,

Shine:

看一下Table 4-3. SOP Configuration里的s3是否是OFF?https://www.ti.com/lit/ug/swru546e/swru546e.pdf

,

Mi He:

是OFF

,

Mi He:

您好,我想询问一下就是我如果使用lua文件脱机操作板子的话,是需要烧录xwr68xx_mmw_demo.bin的吗?因为现在我在手动通过mmwave studio进行操作的时候,是把COM port(Application/User UART)端口进行了擦除后才成功的,我发现我烧录了xwr68xx_mmw_demo.bin文件后,手动的方法就不可以用了,并且使用lua文件仍然编译不通过。脱机操作和使用mmwave studio的操作到底有什么区别,能否提供详细的说明书。

,

Mi He:

您好,我在脚本中强制将partId设置为6843后,按道理就应该可以运行了,但是在运行这句话ar1.PowerOn(0, 1000, 0, 0)的时候,还是出现了问题:

我在论坛上寻找类似的问题,发现大家都是MSS的版本号不正确,为(0,0,0,0)但是我这里应该是已经读取到了正确的版本号,为什么还是会出现错误呢?

,

Shine:

发现您的图接法有问题,还有一根USB线要接在ICBOOST板子上,不是AOPEVM板上。

,

Mi He:

您好,具体的接法您能提供一下吗?我是按照这样的连接方式连接的:

难道脱机操作和使用mmwave studio操作时的连接方式不一致?请问能否提供两种操作方式的说明书?

,

Shine:

可以参考下面帖子里的连接图。https://e2echina.ti.com/support/archived-forums/f/other-analog-forum/202359/iwr6843aop-evm-icboost-dca1000evm-mmwave-studio-mss-0

,

Mi He:

您好,我在查看帖子的时候发现,在进行对端口的Uniflush烧录的时候,我只找得到xwr68xx_mmw_demo.bin文件,找不到xwr68xxAOP_mmw_demo.bin文件,就像下图:

请问该文件在哪里找得到呢?另外,我们的板子型号是AWR6843AOPEVM,而视频里的板子是IWR6843AOP,这个文件是否存在差异?

,

Shine:

截图中的bin文件在C:\ti\mmwave_industrial_toolbox_4_8_0\labs\out_of_box_demo\68xx_aop_mmwave_sdk_hwa\prebuilt_binaries。

Mi He 说:我们的板子型号是AWR6843AOPEVM,而视频里的板子是IWR6843AOP,这个文件是否存在差异?

这两块板子一样的。

赞(0)
未经允许不得转载:TI中文支持网 » AWR6843AOPEVM: 运行DataCaptureDemo_xWR.lua脚本时报错
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1