TI中文支持网
TI专业的中文技术问题咨询交流网站

AWR2243: 如何使用一个主片一个从片

Part Number:AWR2243

在文档《采用级联毫米波传感器的成像雷达参考设计》中,描述了6发8收的使用。而AWR2243默认使用12发16收模式,我使用Cascade_Configuration_MIMO.lua进行配置,请问如何调整.LUA文件,才能6发8收模式采集数据。

Nancy Wang:

我确认一下在给你回复。

,

Nancy Wang:

根据用例,你可以通过编辑脚本中的相应参数来选择需要打开的设备和 TX/RX 。

与此对应的 API 是  ar1.ChanNAdcConfig_mult()。 这对应于脚本中的第 572 行(有关此 API 的详细说明,请参阅下面的链接线程)。根据此处的天线配置,用户需要相应地修改 ar1.ChirpConfig_mult() API(请参阅函数 Configure_Chirps(i),第 117 行)。 

e2e.ti.com/…/3614347

,

Liao Xun:

您好,我尝试了您给的示例,用他上面给的LUA脚本尝试1发12收的模式,可以正常采集数据,但在运行matlab example的时候,出现了错误。附件中是我采数的脚本和matlab报错信息。

我也尝试过直接修改 从片配置中的ar1.ChanNAdcConfig_mult() ,改为6发8收的模式,能正常采数但也出现了matlab报错。
 
 
也尝试过修改RadarDevice,把另外两个从片disable,   RadarDevice       =    {1, 0, 0, 1},但这种情况就不能正常采集数据。

--[[
Sequence being followedA. CONFIGURATION
1. Connecting to TDA
1. Configuring Master from SOP till Channel Config
2. Configuring Slave (i) sequentially from SOP till SPI Connect. i = 1, 2, 3
3. Configuring Slaves together from F/W download till Channel Config
4. Configuring all devices together from LDO Bypass till Frame ConfigNOTE:
Update the following in the script accordingly before running
1. metaImage F/W path on line 32
2. TDA Host Board IP Address on line 39
--]]----------------------------------------User Constants--------------------------------------------dev_list={1, 2, 4, 8}-- Device map
RadarDevice={1, 1, 1, 1}-- {dev1, dev2, dev3, dev4}, 1: Enable, 0: Disable
cascade_mode_list ={1, 2, 2, 2}-- 0: Single chip, 1: Master, 2: Slave-- F/W Download Path-- Uncomment the next line if you wish to pop-up a dialog box to select the firmware image file
-- Otherwise, hardcode the path to the firmware metaimage below
-- By default, the firmware filename is: xwr22xx_metaImage.bin-- metaImagePath=RSTD.BrowseForFile(RSTD.GetSettingsPath(), "bin", "Browse to .bin file")
-- For 2243 ES1.1 devices
metaImagePath="C:\\ti\\mmwave_dfp_02_02_03_01\\firmware\\xwr22xx_metaImage.bin"
-- For 2243 ES1.0 devices
-- metaImagePath="C:\\ti\\mmwave_dfp_02_02_00_02\\firmware\\xwr22xx_metaImage.bin"-- IP Address for the TDA2 Host Board
-- Change this accordingly for your setupTDA_IPAddress="192.168.33.180"-- Device map of all the devices to be enabled by TDA
-- 1 - master ; 2- slave1 ; 4 - slave2 ; 8 - slave3deviceMapOverall=RadarDevice[1] + (RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)
deviceMapSlaves=(RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)-- Enable/Disable Test Source
-- This is useful during bringuptest_source_enable=0-- 0: Disable, 1: Enable------------------------------------------- Sensor Configuration ------------------------------------------------
--[[
The sensor configuration consists of 3 sections:
1) Profile Configuration (common to all 4 AWR devices)
2) Chirp Configuration (unique for each AWR device - mainly because TXs to use aredifferent for each chirp)
3) Frame Configuration (common to all 4 AWR devices, except for the trigger mode for the master)
Change the values below as needed. --]]-- Profile configuration
local profile_indx=0
local start_freq=77-- GHz
local slope=79-- MHz/us
local idle_time=5-- us
local adc_start_time=6-- us
local adc_samples=256-- Number of samples per chirp
local sample_freq=8000-- ksps
local ramp_end_time=40-- us
local rx_gain=48-- dB
local tx0OutPowerBackoffCode=0
local tx1OutPowerBackoffCode=0
local tx2OutPowerBackoffCode=0
local tx0PhaseShifter=0
local tx1PhaseShifter=0
local tx2PhaseShifter=0
local txStartTimeUSec=0
local hpfCornerFreq1=0-- 0: 175KHz, 1: 235KHz, 2: 350KHz, 3: 700KHz
local hpfCornerFreq2=0-- 0: 350KHz, 1: 700KHz, 2: 1.4MHz, 3: 2.8MHz-- Frame configurationlocal start_chirp_tx=0
local end_chirp_tx=0
local nchirp_loops=64-- Number of chirps per frame
local nframes_master=10-- Number of Frames for Master
local nframes_slave=10-- Number of Frames for Slaves
local Inter_Frame_Interval=100-- ms
local trigger_delay=0-- us
local trig_list={1,2,2,2} -- 1: Software trigger, 2: Hardware trigger-- Note: The syntax for this API is:
-- ar1.ChirpConfig_mult(RadarDeviceId, chirpStartIdx, chirpEndIdx, profileId, startFreqVar,
--freqSlopeVar, idleTimeVar, adcStartTimeVar, tx0Enable, tx1Enable, tx2Enable)function Configure_Chirps(i)if (i == 1) then-- Chirp 0if (0 == ar1.ChirpConfig_mult(dev_list[i], 0, 0, 0, 0, 0, 0, 0, 1, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 0 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 0 Configuration failed\n", "red")return -4end-- Chirp 1if (0 == ar1.ChirpConfig_mult(dev_list[i], 1, 1, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 1 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 1 Configuration failed\n", "red")return -4end-- Chirp 2if (0 == ar1.ChirpConfig_mult(dev_list[i], 2, 2, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 2 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 2 Configuration failed\n", "red")return -4end-- Chirp 3if (0 == ar1.ChirpConfig_mult(dev_list[i], 3, 3, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 3 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 3 Configuration failed\n", "red")return -4end-- Chirp 4if (0 == ar1.ChirpConfig_mult(dev_list[i], 4, 4, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 4 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 4 Configuration failed\n", "red")return -4end-- Chirp 5if (0 == ar1.ChirpConfig_mult(dev_list[i], 5, 5, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 5 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 5 Configuration failed\n", "red")return -4end-- Chirp 6if (0 == ar1.ChirpConfig_mult(dev_list[i], 6, 6, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 6 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 6 Configuration failed\n", "red")return -4end-- Chirp 7if (0 == ar1.ChirpConfig_mult(dev_list[i], 7, 7, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 7 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 7 Configuration failed\n", "red")return -4end-- Chirp 8if (0 == ar1.ChirpConfig_mult(dev_list[i], 8, 8, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 8 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 8 Configuration failed\n", "red")return -4end-- Chirp 9if (0 == ar1.ChirpConfig_mult(dev_list[i], 9, 9, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 9 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 9 Configuration failed\n", "red")return -4end-- Chirp 10if (0 == ar1.ChirpConfig_mult(dev_list[i], 10, 10, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 10 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 10 Configuration failed\n", "red")return -4end-- Chirp 11if (0 == ar1.ChirpConfig_mult(dev_list[i], 11, 11, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 11 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 11 Configuration failed\n", "red")return -4endelseif (i == 2) then-- Chirp 0if (0 == ar1.ChirpConfig_mult(dev_list[i], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 0 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 0 Configuration failed\n", "red")return -4end-- Chirp 1if (0 == ar1.ChirpConfig_mult(dev_list[i], 1, 1, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 1 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 1 Configuration failed\n", "red")return -4end-- Chirp 2if (0 == ar1.ChirpConfig_mult(dev_list[i], 2, 2, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 2 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 2 Configuration failed\n", "red")return -4end-- Chirp 3if (0 == ar1.ChirpConfig_mult(dev_list[i], 3, 3, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 3 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 3 Configuration failed\n", "red")return -4end-- Chirp 4if (0 == ar1.ChirpConfig_mult(dev_list[i], 4, 4, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 4 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 4 Configuration failed\n", "red")return -4end-- Chirp 5if (0 == ar1.ChirpConfig_mult(dev_list[i], 5, 5, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 5 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 5 Configuration failed\n", "red")return -4end-- Chirp 6if (0 == ar1.ChirpConfig_mult(dev_list[i], 6, 6, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 6 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 6 Configuration failed\n", "red")return -4end-- Chirp 7if (0 == ar1.ChirpConfig_mult(dev_list[i], 7, 7, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 7 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 7 Configuration failed\n", "red")return -4end-- Chirp 8if (0 == ar1.ChirpConfig_mult(dev_list[i], 8, 8, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 8 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 8 Configuration failed\n", "red")return -4end-- Chirp 9if (0 == ar1.ChirpConfig_mult(dev_list[i], 9, 9, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 9 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 9 Configuration failed\n", "red")return -4end-- Chirp 10if (0 == ar1.ChirpConfig_mult(dev_list[i], 10, 10, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 10 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 10 Configuration failed\n", "red")return -4end-- Chirp 11if (0 == ar1.ChirpConfig_mult(dev_list[i], 11, 11, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 11 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 11 Configuration failed\n", "red")return -4endelseif (i == 3) then-- Chirp 0if (0 == ar1.ChirpConfig_mult(dev_list[i], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 0 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 0 Configuration failed\n", "red")return -4end-- Chirp 1if (0 == ar1.ChirpConfig_mult(dev_list[i], 1, 1, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 1 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 1 Configuration failed\n", "red")return -4end-- Chirp 2if (0 == ar1.ChirpConfig_mult(dev_list[i], 2, 2, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 2 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 2 Configuration failed\n", "red")return -4end-- Chirp 3if (0 == ar1.ChirpConfig_mult(dev_list[i], 3, 3, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 3 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 3 Configuration failed\n", "red")return -4end-- Chirp 4if (0 == ar1.ChirpConfig_mult(dev_list[i], 4, 4, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 4 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 4 Configuration failed\n", "red")return -4end-- Chirp 5if (0 == ar1.ChirpConfig_mult(dev_list[i], 5, 5, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 5 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 5 Configuration failed\n", "red")return -4end-- Chirp 6if (0 == ar1.ChirpConfig_mult(dev_list[i], 6, 6, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 6 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 6 Configuration failed\n", "red")return -4end-- Chirp 7if (0 == ar1.ChirpConfig_mult(dev_list[i], 7, 7, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 7 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 7 Configuration failed\n", "red")return -4end-- Chirp 8if (0 == ar1.ChirpConfig_mult(dev_list[i], 8, 8, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 8 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 8 Configuration failed\n", "red")return -4end-- Chirp 9if (0 == ar1.ChirpConfig_mult(dev_list[i], 9, 9, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 9 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 9 Configuration failed\n", "red")return -4end-- Chirp 10if (0 == ar1.ChirpConfig_mult(dev_list[i], 10, 10, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 10 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 10 Configuration failed\n", "red")return -4end-- Chirp 11if (0 == ar1.ChirpConfig_mult(dev_list[i], 11, 11, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 11 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 11 Configuration failed\n", "red")return -4end--remainelseif (i == 4) then-- Chirp 0if (0 == ar1.ChirpConfig_mult(dev_list[i], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 0 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 0 Configuration failed\n", "red")return -4end-- Chirp 1if (0 == ar1.ChirpConfig_mult(dev_list[i], 1, 1, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 1 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 1 Configuration failed\n", "red")return -4end-- Chirp 2if (0 == ar1.ChirpConfig_mult(dev_list[i], 2, 2, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 2 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 2 Configuration failed\n", "red")return -4end-- Chirp 3if (0 == ar1.ChirpConfig_mult(dev_list[i], 3, 3, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 3 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 3 Configuration failed\n", "red")return -4end-- Chirp 4if (0 == ar1.ChirpConfig_mult(dev_list[i], 4, 4, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 4 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 4 Configuration failed\n", "red")return -4end-- Chirp 5if (0 == ar1.ChirpConfig_mult(dev_list[i], 5, 5, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 5 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 5 Configuration failed\n", "red")return -4end-- Chirp 6if (0 == ar1.ChirpConfig_mult(dev_list[i], 6, 6, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 6 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 6 Configuration failed\n", "red")return -4end-- Chirp 7if (0 == ar1.ChirpConfig_mult(dev_list[i], 7, 7, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 7 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 7 Configuration failed\n", "red")return -4end-- Chirp 8if (0 == ar1.ChirpConfig_mult(dev_list[i], 8, 8, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 8 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 8 Configuration failed\n", "red")return -4end-- Chirp 9if (0 == ar1.ChirpConfig_mult(dev_list[i], 9, 9, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 9 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 9 Configuration failed\n", "red")return -4end-- Chirp 10if (0 == ar1.ChirpConfig_mult(dev_list[i], 10, 10, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 10 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 10 Configuration failed\n", "red")return -4end-- Chirp 11if (0 == ar1.ChirpConfig_mult(dev_list[i], 11, 11, 0, 0, 0, 0, 0, 0, 0, 0)) thenWriteToLog("Device "..i.." : Chirp 11 Configuration successful\n", "green")elseWriteToLog("Device "..i.." : Chirp 11 Configuration failed\n", "red")return -4endendend------------------------------ API Configuration -------------------------------------------------- 1. Connection to TDA. 2. Selecting Cascade/Single Chip.3. Selecting 2-chip/4-chipWriteToLog("Setting up Studio for Cascade started..\n", "blue")if(0 == ar1.ConnectTDA(TDA_IPAddress, 5001, deviceMapOverall)) thenWriteToLog("ConnectTDA Successful\n", "green")
elseWriteToLog("ConnectTDA Failed\n", "red")return -1
endif(0 == ar1.selectCascadeMode(1)) thenWriteToLog("selectCascadeMode Successful\n", "green")
elseWriteToLog("selectCascadeMode Failed\n", "red")return -1
endWriteToLog("Setting up Studio for Cascade ended..\n", "blue")--Master Initialization-- SOP Mode Configuration
if (0 == ar1.SOPControl_mult(1, 4)) thenWriteToLog("Master : SOP Reset Successful\n", "green")
elseWriteToLog("Master : SOP Reset Failed\n", "red")return -1
end-- SPI Connect
if (0 == ar1.PowerOn_mult(1, 0, 1000, 0, 0)) thenWriteToLog("Master : SPI Connection Successful\n", "green")
elseWriteToLog("Master : SPI Connection Failed\n", "red")return -1
end-- Firmware Download. (SOP 4 - MetaImage)
if (0 == ar1.DownloadBssFwOvSPI_mult(1, metaImagePath)) thenWriteToLog("Master : FW Download Successful\n", "green")
elseWriteToLog("Master : FW Download Failed\n", "red")return -1
end-- RF Power Up
if (0 == ar1.RfEnable_mult(1)) thenWriteToLog("Master : RF Power Up Successful\n", "green")
elseWriteToLog("Master : RF Power Up Failed\n", "red")return -1
end-- Channel & ADC Configuration
if (0 == ar1.ChanNAdcConfig_mult(1,1,0,0,1,1,1,1,2,1,0,1)) thenWriteToLog("Master : Channel & ADC Configuration Successful\n", "green")
elseWriteToLog("Master : Channel & ADC Configuration Failed\n", "red")return -2
end-- Slaves Initializationfor i=2,table.getn(RadarDevice) dolocal status=0if ((RadarDevice[1]==1) and (RadarDevice[i]==1)) then-- SOP Mode Configurationif (0 == ar1.SOPControl_mult(dev_list[i], 4)) thenWriteToLog("Device "..i.." : SOP Reset Successful\n", "green")elseWriteToLog("Device "..i.." : SOP Reset Failed\n", "red")return -1end-- SPI Connectif (0 == ar1.AddDevice(dev_list[i])) thenWriteToLog("Device "..i.." : SPI Connection Successful\n", "green")elseWriteToLog("Device "..i.." : SPI Connection Failed\n", "red")return -1endend
end-- Firmware Download. (SOP 4 - MetaImage)
if (0 == ar1.DownloadBssFwOvSPI_mult(deviceMapSlaves, metaImagePath)) thenWriteToLog("Slaves : FW Download Successful\n", "green")
elseWriteToLog("Slaves : FW Download Failed\n", "red")return -1
end-- RF Power Up
if (0 == ar1.RfEnable_mult(deviceMapSlaves)) thenWriteToLog("Slaves : RF Power Up Successful\n", "green")
elseWriteToLog("Slaves : RF Power Up Failed\n", "red")return -1
end-- Channel & ADC Configuration
--[[
if (0 == ar1.ChanNAdcConfig_mult(deviceMapSlaves,1,1,1,1,1,1,1,2,1,0,2)) thenWriteToLog("Slaves : Channel & ADC Configuration Successful\n", "green")
elseWriteToLog("Slaves : Channel & ADC Configuration Failed\n", "red")return -2
end
--]]if (0 == ar1.ChanNAdcConfig_mult(2,0,0,0,1,1,1,1,2,1,0,2)) thenWriteToLog("Slaves : Channel & ADC Configuration Successful\n", "green")
elseWriteToLog("Slaves : Channel & ADC Configuration Failed\n", "red")return -2
endif (0 == ar1.ChanNAdcConfig_mult(4,0,0,0,1,1,1,1,2,1,0,2)) thenWriteToLog("Slaves : Channel & ADC Configuration Successful\n", "green")
elseWriteToLog("Slaves : Channel & ADC Configuration Failed\n", "red")return -2
endif (0 == ar1.ChanNAdcConfig_mult(8,0,0,0,1,1,1,1,2,1,0,2)) thenWriteToLog("Slaves : Channel & ADC Configuration Successful\n", "green")
elseWriteToLog("Slaves : Channel & ADC Configuration Failed\n", "red")return -2
end-- All devices together-- Including this depends on the type of board being used.
-- LDO configuration
if (0 == ar1.RfLdoBypassConfig_mult(deviceMapOverall, 3)) thenWriteToLog("LDO Bypass Successful\n", "green")
elseWriteToLog("LDO Bypass failed\n", "red")return -2
end-- Low Power Mode Configuration
if (0 == ar1.LPModConfig_mult(deviceMapOverall,0, 0)) thenWriteToLog("Low Power Mode Configuration Successful\n", "green")
elseWriteToLog("Low Power Mode Configuration failed\n", "red")return -2
end-- Miscellaneous Control Configuration
if (0 == ar1.SetMiscConfig_mult(deviceMapOverall, 1, 0, 0, 0)) thenWriteToLog("Misc Control Configuration Successful\n", "green")
elseWriteToLog("Misc Control Configuration failed\n", "red")return -2
end-- Edit this API to enable/disable the boot time calibration. Enabled by default.
-- RF Init Calibration Configuration
if (0 == ar1.RfInitCalibConfig_mult(deviceMapOverall, 1, 1, 1, 1, 1, 1, 1, 65537)) thenWriteToLog("RF Init Calibration Successful\n", "green")
elseWriteToLog("RF Init Calibration failed\n", "red")return -2
end-- RF Init
if (0 == ar1.RfInit_mult(deviceMapOverall)) thenWriteToLog("RF Init Successful\n", "green")
elseWriteToLog("RF Init failed\n", "red")return -2
end---------------------------Data Configuration------------------------------------ Data path Configuration
if (0 == ar1.DataPathConfig_mult(deviceMapOverall, 0, 1, 0)) thenWriteToLog("Data Path Configuration Successful\n", "green")
elseWriteToLog("Data Path Configuration failed\n", "red")return -3
end-- Clock Configuration
if (0 == ar1.LvdsClkConfig_mult(deviceMapOverall, 1, 1)) thenWriteToLog("Clock Configuration Successful\n", "green")
elseWriteToLog("Clock Configuration failed\n", "red")return -3
end-- CSI2 Configuration
if (0 == ar1.CSI2LaneConfig_mult(deviceMapOverall, 1, 0, 2, 0, 4, 0, 5, 0, 3, 0, 0)) thenWriteToLog("CSI2 Configuration Successful\n", "green")
elseWriteToLog("CSI2 Configuration failed\n", "red")return -3
end---------------------------Sensor Configuration--------------------------- Profile Configuration
if (0 == ar1.ProfileConfig_mult(deviceMapOverall, 0, start_freq, idle_time, adc_start_time, ramp_end_time,0, 0, 0, 0, 0, 0, slope, 0, adc_samples, sample_freq, 0, 0, rx_gain)) thenWriteToLog("Profile Configuration successful\n", "green")
elseWriteToLog("Profile Configuration failed\n", "red")return -4
end-- Chirp Configuration
for i=1,table.getn(RadarDevice) doif ((RadarDevice[1]==1) and (RadarDevice[i]==1)) thenConfigure_Chirps(i)end
end-- Enabling/ Disabling Test Source
if(test_source_enable == 1) thenar1.EnableTestSource_mult(deviceMapOverall, 1)WriteToLog("Enabling Test Source Configuration successful\n", "green")
end-- Frame Configuration
-- Master
if (0 == ar1.FrameConfig_mult(1,start_chirp_tx,end_chirp_tx,nframes_master, nchirp_loops,Inter_Frame_Interval, 0, 1)) thenWriteToLog("Master : Frame Configuration successful\n", "green")
elseWriteToLog("Master : Frame Configuration failed\n", "red")
end
-- Slaves
if (0 == ar1.FrameConfig_mult(deviceMapSlaves,start_chirp_tx,end_chirp_tx,nframes_slave, nchirp_loops,Inter_Frame_Interval, 0, 2)) thenWriteToLog("Slaves : Frame Configuration successful\n", "green")
elseWriteToLog("Slaves : Frame Configuration failed\n", "red")
end

matlab 报错为:

'TDA2'paramFile= C:\ti\mmwave_studio_03_00_00_14\mmWaveStudio\PostProc\Campus_041107\Campus_041107.mmwave.json无法执行赋值,因为左侧和右侧的元素数目不同。出错 parameter_file_gen_json (第 100 行) TxChannelEnabled(iconfig) = channelID;出错 cascade_MIMO_signalProcessing_beifen (第 81 行) parameter_file_gen_json(dataFolder_test, dataFolder_calib, module_param_file, pathGenParaFile, dataPlatform);

,

Chris Meng:

Liao Xun 说:也尝试过修改RadarDevice,把另外两个从片disable,   RadarDevice       =    {1, 0, 0, 1},但这种情况就不能正常采集数据。

连接前是否有做如下设置?

赞(0)
未经允许不得转载:TI中文支持网 » AWR2243: 如何使用一个主片一个从片
分享到: 更多 (0)