本帖最后由 KA_IX 于 2022-3-16 11:01 编辑

作者:Chris Meng

毫米波用户需要通过测试连续波来确认TI毫米波芯片发射射频信号的频率的准确性。用户对联参考设计板上进行发射天线的连续波测试有不同的测试要求。下面介绍三种不同测试场景的测试流程。

测试条件:
硬件平台: MMWCAS-RF-EVM (revE)/MMWCAS-DSP-EVM
PC软件: mmwave studio 3.00.00.14
AWR2243 ES1.1的固件补丁: mmwave_dfp_02_02_03_01
频谱分析仪

测试场景一
1. 测试要求:对级联板上每个AWR2243所有3根发射天线同时发射连续波的测试。
2. 测试流程:
先在mmwave studio里运行下面的脚本进行所有4片AWR2243的参数配置。\mmwave_studio_03_00_00_14\mmWaveStudio\Scripts\Cascade\Cascade_Configuration_ContStream.lua (测试脚本已经包含在mmwave studio里)
然后运行下面的脚本。这个脚本会先使能芯片Slave 3的连续波发射,然后使能Slave2, Slave1,Master芯片。接着停止所有芯片的信号发射。最后保存相关ADC数据到SSD硬盘上,传送给PC。\mmwave_studio_03_00_00_14\mmWaveStudio\Scripts\Cascade\Cascade_Capture_ContStream.lua(测试脚本已经包含在mmwave studio里)
通过频谱仪抓取和观测芯片的发射信号。

测试场景二
1. 测试要求:对级联板的AWR2243 主芯片(master)的单发射天线进行连续波的测试。
2. 测试流程:
以主芯片的TX0天线为例 (RadarDevice1)
a. 配置主芯片。
在mmwave studio里运行下面的脚本:
Cascade_Configuration_ContStream_master_example.lua (具体内容见附录)
运行脚本后的mmwave studio界面信息如下:
7455.png 5618.jpg
b. 发射连续波。
运行下面的脚本:\mmwave_studio_03_00_00_14\mmWaveStudio\Scripts\Cascade\Cascade_Capture_ContStream.lua(测试脚本已经包含在mmwave studio里)
c. 通过频谱仪抓取和观测芯片的发射信号。

测试场景三

1. 测试要求:对级联板的AWR2243 从芯片(slave)的单发射天线进行连续波的测试。

2. 测试流程:
以slave2芯片的TX1天线为例 (RadarDevice3)
a. 配置从芯片。
在mmwave studio里运行下面的脚本:Cascade_Configuration_ContStream_slave_example.lua(具体内容见附录)
运行脚本后的mmwave studio界面信息如下:
5635.png
5226.jpg

b. 发射连续波。
运行下面的脚本:\mmwave_studio_03_00_00_14\mmWaveStudio\Scripts\Cascade\Cascade_Capture_ContStream.lua(测试脚本已经包含在mmwave studio里)

c. 通过频谱仪抓取和观测芯片的发射信号。

注意事项:
如果改变了AWR2243的ChanNAdcConfig_mult 参数(相对于上一次配置),用户必须对板子进行断电,再上电的操作。

常见问题:

1. 问题:如何使能、不使能主芯片或者是从芯片里的不同发射天线TX?
答案::用户需要修改配置参数的LUA脚本里ar1.ChanNAdcConfig_mult 函数的Tx0En/Tx1En/Tx2En 参数。关于这个函数的更多信息见下。对于Tx0En/Tx1En/Tx2En, 1表示使能,0表示不使能。
Int32 ar1.ChanNAdcConfig_mult(UInt16 RadarDeviceId, UInt16 Tx0En, UInt16 Tx1En, UInt16 Tx2En, UInt16 Rx0En, UInt16 Rx1En, UInt16 Rx2En, UInt32 Rx3En, Int32 BitsVal, UInt32 FmtVal, UInt32 IQSwap, UInt16 CasCadeMode) -  Static device config API which defines configure both the Transmiter and Reciever channels of Radar device and also ADC data format output
_I_ UInt16     RadarDeviceId      - Radar Device Id
_I_ UInt16     Tx0En     - Tx0 channel
_I_ UInt16     Tx1En     - Tx1 channel
_I_ UInt16     Tx2En     - Tx2 channel
_I_ UInt16     Rx0En     - Rx0 channel
_I_ UInt16     Rx1En     - Rx1 channnel
_I_ UInt16     Rx2En     - Rx2 channel
_I_ UInt32     Rx3En     - Rx3 channel[b15:0] + (CascadePinOutCfg[b31:16] b16:ClkOutMasterDis, b17:SynOutMasterDis, b18:ClkOutSlaveEna, b19:SynOutSlaveEna, b20:IntLOMasterEna, b21:OSCClkOutMasterDis, b22:INTFRCMasterEna)
_I_ Int32        BitsVal    - Number of ADC bits
_I_ UInt32     FmtVal    - ADC output format[b15:0] + FullScaleReductionFactor[b31:16]
_I_ UInt32     IQSwap   - ADC Mode
_I_ UInt16     CasCadeMode      - CascadeMode(Single Chip: 0x0000, MultiChip Master:0x0001, MultiChip Slave:0x0002)

2. 问题:如何使能或者关闭级联板上不同的从芯片?
答案:用户需要修改配置参数的LUA里RadarDevice的设置。RadarDevice里dev1是主芯片,dev2、dev3、dev4是从芯片。
例如: RadarDevice        =    {1, 0, 1, 0}       -- {dev1, dev2, dev3, dev4}, 1: Enable, 0: Disable

3. 问题:如何改变连续波的频率?
答案:用户需要修改配置参数的LUA里ar1.ContStrConfig_mult函数的startFreqConst参数值。
Int32 ar1.ContStrConfig_mult(UInt16 RadarDeviceId, Double startFreqConst, UInt16 digOutSampleRate, Char rxGain, Char hpfCornerFreq1, Char hpfCornerFreq2, UInt32 tx0OutPowerBackoffCode, UInt32 tx1OutPowerBackoffCode, UInt32 tx2OutPowerBackoffCode, UInt16 tx0PhaseShifter, UInt16 tx1PhaseShifter, UInt32 tx2PhaseShifter) - Continuous Streming Configuration API defines Configuration of the data path to transfer the captured ADC samples continuously without missing any sample to external Device(host)
_I_ UInt16     RadarDeviceId      - Radar Device Id
_I_ Double    startFreqConst      - Start Frequency for each profile of chirp in GHz
_I_ UInt16     digOutSampleRate               - ADC sampling rate for each profile in ksps
_I_ Char         rxGain    - Rx gain for each profile in dB
_I_ Char         hpfCornerFreq1   - HPF1 corner frequency for each profile in KHz
_I_ Char         hpfCornerFreq2   - HPF2 corner frequency for each profile in KHz
_I_ UInt32     tx0OutPowerBackoffCode - How much the trasmit power should be reduced from Max in Tx0 Channel
_I_ UInt32     tx1OutPowerBackoffCode - How much the trasmit power should be reduced from Max in Tx1 Channel
_I_ UInt32     tx2OutPowerBackoffCode - How much the trasmit power should be reduced from Max in Tx2 Channel
_I_ UInt16     tx0PhaseShifter    - The additional phase shift to be introduced on Tx0 Channel
_I_ UInt16     tx1PhaseShifter    - The additional phase shift to be introduced on Tx1 Channel
_I_ UInt32     tx2PhaseShifter    - The additional phase shift to be introduced on Tx2 Channel(b0:15) + ForceSelect(b16) + VCOSelecct(b17))

附录:
  1. 1.        Cascade_Configuration_ContStream_master_example.lua
  2. ----------------------------------------User Constants--------------------------------------------
  3.       
  4. dev_list           =    {1, 2, 4, 8}       -- Device map
  5. RadarDevice        =    {1, 0, 0, 0}       -- {dev1, dev2, dev3, dev4}, 1: Enable, 0: Disable
  6. cascade_mode_list  =    {0, 2, 2, 2}       -- 0: Single chip, 1: Master, 2: Slave //Chris: need to set in code directly
  7. -- F/W Download Path
  8. -- Uncomment the next line if you wish to pop-up a dialog box to select the firmware image file
  9. -- Otherwise, hardcode the path to the firmware metaimage below
  10. -- By default, the firmware filename is: xwr22xx_metaImage.bin
  11. -- metaImagePath   =   RSTD.BrowseForFile(RSTD.GetSettingsPath(), "bin", "Browse to .bin file")
  12. -- For 2243 ES1.1 devices
  13. metaImagePath            =   "C:\\ti\\mmwave_dfp_02_02_03_01\\firmware\\xwr22xx_metaImage.bin"
  14. -- For 2243 ES1.0 devices
  15. -- metaImagePath            =   "C:\\ti\\mmwave_dfp_02_02_00_02\\firmware\\xwr22xx_metaImage.bin"
  16. -- IP Address for the TDA2 Host Board
  17. -- Change this accordingly for your setup
  18. TDA_IPAddress           =   "192.168.33.180"
  19. -- Device map of all the devices to be enabled by TDA
  20. -- 1 - master ; 2- slave1 ; 4 - slave2 ; 8 - slave3
  21. deviceMapOverall  =   RadarDevice[1] + (RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)
  22. deviceMapSlaves   =   (RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)         
  23. ------------------------------ API Configuration ------------------------------------------------
  24.    
  25. -- 1. Connection to TDA. 2. Selecting Cascade/Single Chip.  3. Selecting 2-chip/4-chip
  26. WriteToLog("Setting up Studio for Cascade started..\n", "blue")
  27. if(0 == ar1.ConnectTDA(TDA_IPAddress, 5001, deviceMapOverall)) then
  28.     WriteToLog("ConnectTDA Successful\n", "green")
  29. else
  30.     WriteToLog("ConnectTDA Failed\n", "red")
  31.     return -1
  32. end
  33. if(0 == ar1.selectCascadeMode(1)) then
  34.     WriteToLog("selectCascadeMode Successful\n", "green")
  35. else
  36.     WriteToLog("selectCascadeMode Failed\n", "red")
  37.     return -1
  38. end
  39. WriteToLog("Setting up Studio for Cascade ended..\n", "blue")
  40.          
  41. --Master Initialization
  42. -- SOP Mode Configuration
  43. if (0 == ar1.SOPControl_mult(1, 4)) then
  44.     WriteToLog("Master : SOP Reset Successful\n", "green")
  45. else
  46.     WriteToLog("Master : SOP Reset Failed\n", "red")
  47.     return -1
  48. end
  49. -- SPI Connect
  50. if (0 == ar1.PowerOn_mult(1, 0, 1000, 0, 0)) then
  51.     WriteToLog("Master : SPI Connection Successful\n", "green")
  52. else
  53.     WriteToLog("Master : SPI Connection Failed\n", "red")
  54.     return -1
  55. end
  56. -- Firmware Download. (SOP 4 - MetaImage)
  57. if (0 == ar1.DownloadBssFwOvSPI_mult(1, metaImagePath)) then
  58.     WriteToLog("Master : FW Download Successful\n", "green")
  59. else
  60.     WriteToLog("Master : FW Download Failed\n", "red")
  61.     return -1
  62. end
  63. -- RF Power Up
  64. if (0 == ar1.RfEnable_mult(1)) then
  65.     WriteToLog("Master : RF Power Up Successful\n", "green")
  66. else
  67.     WriteToLog("Master : RF Power Up Failed\n", "red")
  68.     return -1
  69. end            
  70.          
  71. -- Channel & ADC Configuration
  72. if (0 == ar1.ChanNAdcConfig_mult(1,1,0,0,1,1,1,1,2,1,0,0)) then
  73.     WriteToLog("Master : Channel & ADC Configuration Successful\n", "green")
  74. else
  75.     WriteToLog("Master : Channel & ADC Configuration Failed\n", "red")
  76.     return -2
  77. end
  78.    
  79.             
  80. -- All devices together        
  81.          
  82. -- Including this depends on the type of board being used.
  83. -- LDO configuration
  84. if (0 == ar1.RfLdoBypassConfig_mult(deviceMapOverall, 3)) then
  85.     WriteToLog("LDO Bypass Successful\n", "green")
  86. else
  87.     WriteToLog("LDO Bypass failed\n", "red")
  88.     return -2
  89. end
  90. -- Low Power Mode Configuration
  91. if (0 == ar1.LPModConfig_mult(deviceMapOverall,0, 0)) then
  92.     WriteToLog("Low Power Mode Configuration Successful\n", "green")
  93. else
  94.     WriteToLog("Low Power Mode Configuration failed\n", "red")
  95.     return -2
  96. end
  97. -- Miscellaneous Control Configuration
  98. if (0 == ar1.SetMiscConfig_mult(deviceMapOverall, 1, 0, 0, 0)) then
  99.     WriteToLog("Misc Control Configuration Successful\n", "green")
  100. else
  101.     WriteToLog("Misc Control Configuration failed\n", "red")
  102.     return -2
  103. end
  104. -- Edit this API to enable/disable the boot time calibration. Enabled by default.
  105. -- RF Init Calibration Configuration
  106. if (0 == ar1.RfInitCalibConfig_mult(deviceMapOverall, 1, 1, 1, 1, 1, 1, 1, 65537)) then
  107.     WriteToLog("RF Init Calibration Successful\n", "green")
  108. else
  109.     WriteToLog("RF Init Calibration failed\n", "red")
  110.     return -2
  111. end
  112.          
  113. -- RF Init
  114. if (0 == ar1.RfInit_mult(deviceMapOverall)) then
  115.     WriteToLog("RF Init Successful\n", "green")
  116. else
  117.     WriteToLog("RF Init failed\n", "red")
  118.     return -2
  119. end
  120. ---------------------------Data Configuration----------------------------------
  121.         
  122. -- Data path Configuration
  123. if (0 == ar1.DataPathConfig_mult(deviceMapOverall, 0, 1, 0)) then
  124.     WriteToLog("Data Path Configuration Successful\n", "green")
  125. else
  126.     WriteToLog("Data Path Configuration failed\n", "red")
  127.     return -3
  128. end
  129. -- Clock Configuration
  130. if (0 == ar1.LvdsClkConfig_mult(deviceMapOverall, 1, 1)) then
  131.     WriteToLog("Clock Configuration Successful\n", "green")
  132. else
  133.     WriteToLog("Clock Configuration failed\n", "red")
  134.     return -3
  135. end
  136. -- CSI2 Configuration
  137. if (0 == ar1.CSI2LaneConfig_mult(deviceMapOverall, 1, 0, 2, 0, 4, 0, 5, 0, 3, 0, 0)) then
  138.     WriteToLog("CSI2 Configuration Successful\n", "green")
  139. else
  140.     WriteToLog("CSI2 Configuration failed\n", "red")
  141.     return -3
  142. end
  143. 2.        Cascade_Configuration_ContStream_slave_example.lua
  144. ----------------------------------------User Constants--------------------------------------------
  145.       
  146. dev_list           =    {1, 2, 4, 8}       -- Device map
  147. RadarDevice        =    {1, 0, 1, 0}       -- {dev1, dev2, dev3, dev4}, 1: Enable, 0: Disable
  148. cascade_mode_list  =    {1, 2, 2, 2}       -- 0: Single chip, 1: Master, 2: Slave
  149. -- F/W Download Path
  150. -- Uncomment the next line if you wish to pop-up a dialog box to select the firmware image file
  151. -- Otherwise, hardcode the path to the firmware metaimage below
  152. -- By default, the firmware filename is: xwr22xx_metaImage.bin
  153. -- metaImagePath   =   RSTD.BrowseForFile(RSTD.GetSettingsPath(), "bin", "Browse to .bin file")
  154. -- For 2243 ES1.1 devices
  155. metaImagePath            =   "C:\\ti\\mmwave_dfp_02_02_03_01\\firmware\\xwr22xx_metaImage.bin"
  156. -- For 2243 ES1.0 devices
  157. -- metaImagePath            =   "C:\\ti\\mmwave_dfp_02_02_00_02\\firmware\\xwr22xx_metaImage.bin"
  158. -- IP Address for the TDA2 Host Board
  159. -- Change this accordingly for your setup
  160. TDA_IPAddress           =   "192.168.33.180"
  161. -- Device map of all the devices to be enabled by TDA
  162. -- 1 - master ; 2- slave1 ; 4 - slave2 ; 8 - slave3
  163. deviceMapOverall  =   RadarDevice[1] + (RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)
  164. deviceMapSlaves   =   (RadarDevice[2]*2) + (RadarDevice[3]*4) + (RadarDevice[4]*8)         
  165. ------------------------------ API Configuration ------------------------------------------------
  166.    
  167. -- 1. Connection to TDA. 2. Selecting Cascade/Single Chip.  3. Selecting 2-chip/4-chip
  168. WriteToLog("Setting up Studio for Cascade started..\n", "blue")
  169. if(0 == ar1.ConnectTDA(TDA_IPAddress, 5001, deviceMapOverall)) then
  170.     WriteToLog("ConnectTDA Successful\n", "green")
  171. else
  172.     WriteToLog("ConnectTDA Failed\n", "red")
  173.     return -1
  174. end
  175. if(0 == ar1.selectCascadeMode(1)) then
  176.     WriteToLog("selectCascadeMode Successful\n", "green")
  177. else
  178.     WriteToLog("selectCascadeMode Failed\n", "red")
  179.     return -1
  180. end
  181. WriteToLog("Setting up Studio for Cascade ended..\n", "blue")
  182.          
  183. --Master Initialization
  184. -- SOP Mode Configuration
  185. if (0 == ar1.SOPControl_mult(1, 4)) then
  186.     WriteToLog("Master : SOP Reset Successful\n", "green")
  187. else
  188.     WriteToLog("Master : SOP Reset Failed\n", "red")
  189.     return -1
  190. end
  191. -- SPI Connect
  192. if (0 == ar1.PowerOn_mult(1, 0, 1000, 0, 0)) then
  193.     WriteToLog("Master : SPI Connection Successful\n", "green")
  194. else
  195.     WriteToLog("Master : SPI Connection Failed\n", "red")
  196.     return -1
  197. end
  198. -- Firmware Download. (SOP 4 - MetaImage)
  199. if (0 == ar1.DownloadBssFwOvSPI_mult(1, metaImagePath)) then
  200.     WriteToLog("Master : FW Download Successful\n", "green")
  201. else
  202.     WriteToLog("Master : FW Download Failed\n", "red")
  203.     return -1
  204. end
  205. -- RF Power Up
  206. if (0 == ar1.RfEnable_mult(1)) then
  207.     WriteToLog("Master : RF Power Up Successful\n", "green")
  208. else
  209.     WriteToLog("Master : RF Power Up Failed\n", "red")
  210.     return -1
  211. end            
  212.          
  213. -- Channel & ADC Configuration
  214. if (0 == ar1.ChanNAdcConfig_mult(1,0,0,0,1,1,1,1,2,1,0,1)) then
  215.     WriteToLog("Master : Channel & ADC Configuration Successful\n", "green")
  216. else
  217.     WriteToLog("Master : Channel & ADC Configuration Failed\n", "red")
  218.     return -2
  219. end
  220.    
  221. -- Slaves Initialization
  222.    
  223. for i=2,table.getn(RadarDevice) do
  224.     local status    =    0               
  225.     if ((RadarDevice[1]==1) and (RadarDevice[i]==1)) then
  226.       
  227.         -- SOP Mode Configuration
  228.         if (0 == ar1.SOPControl_mult(dev_list[i], 4)) then
  229.             WriteToLog("Device "..i.." : SOP Reset Successful\n", "green")
  230.         else
  231.             WriteToLog("Device "..i.." : SOP Reset Failed\n", "red")
  232.             return -1
  233.         end
  234.                
  235.         -- SPI Connect   
  236.         if (0 == ar1.AddDevice(dev_list[i])) then
  237.             WriteToLog("Device "..i.." : SPI Connection Successful\n", "green")
  238.         else
  239.             WriteToLog("Device "..i.." : SPI Connection Failed\n", "red")
  240.             return -1
  241.         end
  242.            
  243.     end
  244. end  
  245.    
  246. -- Firmware Download. (SOP 4 - MetaImage)
  247. if (0 == ar1.DownloadBssFwOvSPI_mult(deviceMapSlaves, metaImagePath)) then
  248.     WriteToLog("Slaves : FW Download Successful\n", "green")
  249. else
  250.     WriteToLog("Slaves : FW Download Failed\n", "red")
  251.     return -1
  252. end
  253.          
  254. -- RF Power Up
  255. if (0 == ar1.RfEnable_mult(deviceMapSlaves)) then
  256.     WriteToLog("Slaves : RF Power Up Successful\n", "green")
  257. else
  258.     WriteToLog("Slaves : RF Power Up Failed\n", "red")
  259.     return -1
  260. end   
  261. -- Channel & ADC Configuration
  262. if (0 == ar1.ChanNAdcConfig_mult(deviceMapSlaves,0,1,0,1,1,1,1,2,1,0,2)) then
  263.     WriteToLog("Slaves : Channel & ADC Configuration Successful\n", "green")
  264. else
  265.     WriteToLog("Slaves : Channel & ADC Configuration Failed\n", "red")
  266.     return -2
  267. end
  268.             
  269. -- All devices together        
  270.          
  271. -- Including this depends on the type of board being used.
  272. -- LDO configuration
  273. if (0 == ar1.RfLdoBypassConfig_mult(deviceMapOverall, 3)) then
  274.     WriteToLog("LDO Bypass Successful\n", "green")
  275. else
  276.     WriteToLog("LDO Bypass failed\n", "red")
  277.     return -2
  278. end
  279. -- Low Power Mode Configuration
  280. if (0 == ar1.LPModConfig_mult(deviceMapOverall,0, 0)) then
  281.     WriteToLog("Low Power Mode Configuration Successful\n", "green")
  282. else
  283.     WriteToLog("Low Power Mode Configuration failed\n", "red")
  284.     return -2
  285. end
  286. -- Miscellaneous Control Configuration
  287. if (0 == ar1.SetMiscConfig_mult(deviceMapOverall, 1, 0, 0, 0)) then
  288.     WriteToLog("Misc Control Configuration Successful\n", "green")
  289. else
  290.     WriteToLog("Misc Control Configuration failed\n", "red")
  291.     return -2
  292. end
  293. -- Edit this API to enable/disable the boot time calibration. Enabled by default.
  294. -- RF Init Calibration Configuration
  295. if (0 == ar1.RfInitCalibConfig_mult(deviceMapOverall, 1, 1, 1, 1, 1, 1, 1, 65537)) then
  296.     WriteToLog("RF Init Calibration Successful\n", "green")
  297. else
  298.     WriteToLog("RF Init Calibration failed\n", "red")
  299.     return -2
  300. end
  301.          
  302. -- RF Init
  303. if (0 == ar1.RfInit_mult(deviceMapOverall)) then
  304.     WriteToLog("RF Init Successful\n", "green")
  305. else
  306.     WriteToLog("RF Init failed\n", "red")
  307.     return -2
  308. end
  309. ---------------------------Data Configuration----------------------------------
  310.         
  311. -- Data path Configuration
  312. if (0 == ar1.DataPathConfig_mult(deviceMapOverall, 0, 1, 0)) then
  313.     WriteToLog("Data Path Configuration Successful\n", "green")
  314. else
  315.     WriteToLog("Data Path Configuration failed\n", "red")
  316.     return -3
  317. end
  318. -- Clock Configuration
  319. if (0 == ar1.LvdsClkConfig_mult(deviceMapOverall, 1, 1)) then
  320.     WriteToLog("Clock Configuration Successful\n", "green")
  321. else
  322.     WriteToLog("Clock Configuration failed\n", "red")
  323.     return -3
  324. end
  325. -- CSI2 Configuration
  326. if (0 == ar1.CSI2LaneConfig_mult(deviceMapOverall, 1, 0, 2, 0, 4, 0, 5, 0, 3, 0, 0)) then
  327.     WriteToLog("CSI2 Configuration Successful\n", "green")
  328. else
  329.     WriteToLog("CSI2 Configuration failed\n", "red")
  330.     return -3
  331. end
[size=15.399999618530273px]

[size=15.399999618530273px]来源:德州仪器