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.

AWRL6432BOOST: how to change the chirp parameters of Tx1 and Tx2

Part Number: AWRL6432BOOST

Tool/software:

Hi, teams.

I want to change the chirp parameters of Tx1 and Tx2 and transmit in TDM mode.

I was considering using Tx0 EnableSel and Tx1EnableSel in mmWaveStudio 4.1.0.6 to achieve this.

To generate a chirp similar to the one shown in the diagram, is this configuration correct?

-- Chirp mode setup and RX data capture/postproc

local num_rx_channels = 3

-- TX/RX channel config
xw_status=mws.fecRfPwrOnOff(0,{h_RxChCtrlBitMask=(2^num_rx_channels)-1,h_TxChCtrlBitMask=3,c_MiscCtrl=1,h_Reserved1=0,w_Reserved2=0})
assert(xw_status == 0, "ERROR: API failed")

-- RF Factory Cal to set RX gain, TX backoff
local rx_gain_db = 36
local rf_fact_cal_start_freq_mhz = 61000
local cali_slope_MHzpus = 2.2 --Use 87 for a 4G BW.
local Tx_BO = 0

xw_status, w_freqCode = mws.sensConvFreqToCode(0, 0, 0, rf_fact_cal_start_freq_mhz)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_slopeCode = mws.sensConvSlopeToCode(0,0,cali_slope_MHzpus)
assert(xw_status == 0, "ERROR: API failed")

-- -- VCO & LO dist factory cal + Tx/Rx Factory Cal
xw_status, response=mws.fecRfBootCal(0,{h_CalCtrlBitMask=238,c_MiscCalCtrl=0,c_CalRxGainSel=rx_gain_db,c_CalTxBackOffSel0=Tx_BO,c_CalTxBackOffSel1=Tx_BO,c_CalTxBackOffSel2=0,c_CalTxBackOffSel3=0,h_CalRfFreq=w_freqCode,xh_CalRfSlope=w_slopeCode,c_TxPwrCalTxEnaMask0=3,c_TxPwrCalTxEnaMask1=1,c_TxPwrCalTxEnaMask2=0,c_TxPwrCalTxEnaMask3=0})
assert(xw_status == 0, "ERROR: API failed")
-- Run Cal : setting Tx power and Rx gain cal to default LUT values, overriding rx_gain_db & Tx_BO above
xw_status, response=mws.fecRfRuntimeCal(0,{h_CalCtrlBitMask=206,h_Reserved0=0,c_TempBinIndex=8})
assert(xw_status == 0, "ERROR: API failed")


-- Chirp/profile common configuration
local rf_start_freq_mhz = 60000
local num_samples_per_chirp = 128
local slope_MHzpus = 20--30--47.95
local Sampling_Rate_Decimator = 23 -- 100/Sampling_Rate_Decimator is the Sampling Rate,
local ramp_end_time_us = 36.1
local idle_time_us = 8
local tx_start_time_us = 1
local adc_start_time_us = 0  
local Num_Skip_Samples = 24
local MIMO_mode = 1 -- 0, manual 1:tdm-mimo, 4: BPM-MIMO
local Tx_enable = 1 -- 1: Tx 1 enable, 2: Tx2 enable, 3: Tx1 & Tx2 enable.
local hpf_sel = 1 -- HPF corner frequency 0: 175KHz; 1: 350KHz; 2:700KHz; 3: 1400KHz
local hpf_fast_init_duration_us = 1.5
--local HPF_Fast_Init_Enable =  1
--local CRD_en = 1 -- 0 or 1 only
--local CRD_dith_en = 1 -- 0 or 1 only
local MiscSetting = 0 --(1- HPF_Fast_Init_Enable)+(1-CRD_en)*2 + (1-CRD_dith_en)*4 --  0: CRD Enable/dither dis 2: CRD disable
local CRD_Slope = 0x277 -- = totalBandInKHz/min(6, (idleTimeInus-1))/457.763

xw_status, hpf_fast_init_duration_code = mws.sensConvTimeToCode(0,0,hpf_fast_init_duration_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, ramp_end_time_code = mws.sensConvTimeToCode(0,0,ramp_end_time_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_timeCode = mws.sensConvTimeToCode(0,1,10)
assert(xw_status == 0, "ERROR: API failed")
xw_status=mws.sensChirpPfComnCfg(0,{c_DigOutputSampRate=Sampling_Rate_Decimator,c_DigOutputBitsSel=0,c_DfeFirSel=0,c_VcoMultiChipMode=0,h_NumOfAdcSamples=num_samples_per_chirp,c_ChirpTxMimoPatSel=MIMO_mode,c_MiscSettings=MiscSetting,c_HpfFastInitDuration=hpf_fast_init_duration_code,h_CrdNSlopeMag=CRD_Slope,h_ChirpRampEndTime=ramp_end_time_code,c_ChirpRxHpfSel=hpf_sel})
assert(xw_status == 0, "ERROR: API failed")

-- Chirp/profile timing configuration
xw_status, idle_time_code = mws.sensConvTimeToCode(0,0,idle_time_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, adc_start_time_code = mws.sensConvTimeToCode(0,0,adc_start_time_us)
assert(xw_status == 0, "ERROR: API failed")
adc_start_time_code = adc_start_time_code + 1024*Num_Skip_Samples
xw_status, tx_start_time_code = mws.sensConvTimeToCode(0,0,tx_start_time_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_slopeCode = mws.sensConvSlopeToCode(0,0,slope_MHzpus)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_freqCode = mws.sensConvFreqToCode(0, 0, 0, rf_start_freq_mhz)
assert(xw_status == 0, "ERROR: API failed")
xw_status=mws.sensChirpPfTimeCfg(0,{h_ChirpIdleTime=idle_time_code,h_ChirpAdcStartTime=adc_start_time_code,xh_ChirpTxStartTime=tx_start_time_code,xh_ChirpRfFreqSlope=w_slopeCode,w_ChirpRfFreqStart=w_freqCode,h_ChirpTxEnSel=Tx_enable,h_ChirpTxBpmEnSel=0,w_Reserved1=0,w_Reserved2=0,w_Reserved3=0,w_Reserved4=0,w_Reserved5=0})
assert(xw_status == 0, "ERROR: API failed")






local slope_MHzpus = 47.95 --30--47.95
local Tx_enable = 2 -- 1: Tx 1 enable, 2: Tx2 enable, 3: Tx1 & Tx2 enable.


xw_status, idle_time_code = mws.sensConvTimeToCode(0,0,idle_time_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, adc_start_time_code = mws.sensConvTimeToCode(0,0,adc_start_time_us)
assert(xw_status == 0, "ERROR: API failed")
adc_start_time_code = adc_start_time_code + 1024*Num_Skip_Samples
xw_status, tx_start_time_code = mws.sensConvTimeToCode(0,0,tx_start_time_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_slopeCode = mws.sensConvSlopeToCode(0,0,slope_MHzpus)
assert(xw_status == 0, "ERROR: API failed")
xw_status, w_freqCode = mws.sensConvFreqToCode(0, 0, 0, rf_start_freq_mhz)
assert(xw_status == 0, "ERROR: API failed")
xw_status=mws.sensChirpPfTimeCfg(0,{h_ChirpIdleTime=idle_time_code,h_ChirpAdcStartTime=adc_start_time_code,xh_ChirpTxStartTime=tx_start_time_code,xh_ChirpRfFreqSlope=w_slopeCode,w_ChirpRfFreqStart=w_freqCode,h_ChirpTxEnSel=Tx_enable,h_ChirpTxBpmEnSel=0,w_Reserved1=0,w_Reserved2=0,w_Reserved3=0,w_Reserved4=0,w_Reserved5=0})
assert(xw_status == 0, "ERROR: API failed")

-- Frame configuration
local burst_period_us = 200 -- need to >= (num_chirp_per_burst * (idleTime + RampTime) + 100us)
local num_burst_per_frame = 128
local num_chirp_per_burst = 2
local num_frames = 10
xw_status, burst_period_code = mws.sensConvTimeToCode(0,0,burst_period_us)
assert(xw_status == 0, "ERROR: API failed")
local frame_period_us = 100000
xw_status, w_ftPeriodCode = mws.sensConvFtPeriodToCode(0, 10240, frame_period_us)
assert(xw_status == 0, "ERROR: API failed")
xw_status=mws.sensFrameCfg(0,{h_NumOfChirpsInBurst=num_chirp_per_burst,c_NumOfChirpsAccum=0,w_BurstPeriodicity=burst_period_code,h_NumOfBurstsInFrame=num_burst_per_frame,w_FramePeriodicity=w_ftPeriodCode,h_NumOfFrames=num_frames,w_FrameEvent0TimeCfg=0,w_FrameEvent1TimeCfg=0})
assert(xw_status == 0, "ERROR: API failed")

-- Enable RDIF
xw_status=mws.fecRdifctrl(0,{c_RdifEnable=10,c_RdifCfg=40,h_RdifSampleCount=num_samples_per_chirp,c_TestPatternEn=0,c_LaneRateCfg=0,h_Reserved2=0,h_TestPatrnInitCodeCh0=20,h_TestPatrnInitCodeCh1=20,h_TestPatrnInitCodeCh2=20,h_Reserved3=0,h_TestPatrnIncrCodeCh0=20,h_TestPatrnIncrCodeCh1=20,h_TestPatrnIncrCodeCh2=20,h_Reserved4=0,w_Reserved5=0})
assert(xw_status == 0, "ERROR: API failed")

--mws.Calling_WriteAddr_Single(0x51000020,0x0) -- Sets Frac ADC and skip sample to 0 -> ADC start time = 0


-- ******************* CAPTURE SEQUENCE STARTS HERE ***********************

-- Remove old ADC bin file if it exists (DCA1000 adds "_Raw_0" to filename)
local adc_bin_file_directory = RSTD.GetWorkingDirectory() .. [[\..\PostProc\]]
local adc_bin_file = adc_bin_file_directory .. [[adc_data1.bin]]
os.remove(adc_bin_file_directory .. [[adc_data_Raw_0.bin]])

-- Arm DCA1000 for capture (using "Infinite" stop mode which will stop capture automatically once data from device stops)
xw_status=mws.captureCardStartRecord(adc_bin_file, 1, 1, 4096)
assert(xw_status == 0, "ERROR: API failed")
p(1000)

-- Trigger start of framing
xw_status=mws.sensorStart(0,{c_FrameTrigMode=0,c_ChirpStartSigLbEn=0,c_FrameLivMonEn=0,c_Reserved=0,w_FrameTrigTimerVal=0,w_Reserved1=0})
assert(xw_status == 0, "ERROR: API failed")

-- <<<  CAPTURE HAPPENS HERE >>>

-- Wait 4 sec
print("Waiting 4 sec")
p(4000)

-- ******************* CAPTURE SEQUENCE ENDS HERE ***********************

-- Start Matlab Postproc
xw_status = mws.StartMatlabPostProc(adc_bin_file, 0)
assert(xw_status == 0, "ERROR: API failed")
  • HI, there:

    Please consider to use per chirp configuration API.   RL_SENSOR_PER_CHIRP_CFG. It is mentioned inside C:\ti\mmwave_studio_04_01_00_06\docs\mmwave_studio_lua_api_documentation.pdf 

    Also, please let me know if you found the following e2e thread helpful

    AWRL1432: Customize BPM coding for AWRL1432 - Sensors forum - Sensors - TI E2E support forums

    Best,

    Zigang

  • Hi Zigang.

    Please confirm the steps for using RL_SENSOR_PER_CHIRP_CFG.

    Assuming the following steps, please correct or supplement if there are any errors.

    Note that the parameters are based on the provided diagram.

    Step1.Prepare seven files for PER_CHIRP_PARAM:

    ADC_START_TIME 16

    1590

    1590

    FREQ_SLOPE 16

    02BB

    068C

    FREQ_START 32

    0007CFC9

    0007CFC9

    IDLE_TIME 16

    1590

    1590

    TX_BPM 4

    0

    0

    TX_EN 4

    1

    2

    TX_START_TIME 16

    0000

    0000

    Step2.Run the following commands in the Lua file:

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\adc_start_time.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\freq_slope.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\freq_start.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\idle_time.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\tx_bpm.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\tx_en.txt")

    xw_status = mws.sensPerChirpLut(0,0,1,"..\PerChirpLut\tx_start_time.txt")

  • HI, there:

    I have never done that myself. Please give me some time to find the answer.

    Best,

    Zigang 

  • HI, there:

    1) First will need to reprogram the LUT entry based on your setup.  You can use the misc Tab in the mmwave studio to help.  And you need to make sure what resolution you were programming.  

    2) You will need to program all the following command including perChirpLUT, perChirpConfig and perChirpCtrl.  I assume you only have two chirps, so I modify the len of array to 2 for you in per-chirp config 

    3) For BPM configure, please let me know what you want to program, so that I can check the configure for you as well.  For example: chirp1: TX0 - TX1, chirp2: TX0 + TX1.   The tx_en and tx_bpm is little tricking.  One element contains information for two chirps. 

    Best,

    Zigang