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.

IWRL6432BOOST: ADC data difference between DCA1000EVM and IWRL6432BOOST

Part Number: IWRL6432BOOST
Other Parts Discussed in Thread: DCA1000EVM, IWRL6432

Tool/software:

Dear TI experts,

I have been collecting raw ADC data using DCA1000EVM and mmwave studio.

Signal quality is great, and we found a configuration we want. 

Recently discovered ADC data can be streamed with SPI, and now I am using SPI to collect raw ADC data.

However, it seems like the data collected using DCA1000EVM has a lot less noise in range-azimuth-angle when looking at the heatmap.

I tried to set all configuration as same as DCA1000 for cfg files, and collected with same action with same environment.

What is making the quality difference? Is DCA1000EVM doing something?

Best

Seho Kim

  • Hi

    Thanks for your query. Please allow us a couple of days to respond.

    Regards

  • Hello Seho Kim,

    There will always be some variability between raw data capture sessions, but if configured properly there should not be much of a difference. You are saying that you are using the exact same configurations, environment, parsing scripts, and FFT algorithms but the data is substantially different?

    Best Regards,

    Pedrhom

  • Hello Pedrhom,

    I am not sure if it is exact the same between lua script and the cfg files. I set most of the values and compared variables that I could find, and they were the same. But I made sure that environment and parsing script, and algorithm is same. However the range-azimuth heatmap for SPI was more noisy than with the one with DCA1000EVM. I have compared with data captured at same time with same target.


    Is it possible to check whether .cfg file and .lua file have same configurations?


    Best Regards,

    Seho

  • Hello Seho,

    I can take a look if you post your cfg and lua scripts respectively.

    Best Regards,

    Pedrhom

  • Hello Pedrhom,

    Here it does not let me upload the lua script as attachment file.

    I am pasting the contents below, and it was saved as test_lua.lua

    -------- RADAR PARAMETERS --------
    
    -- Change the directory for the firmware file
    local firmware_directory_base = [[C:\ti\MMWAVE_L_SDK_05_01_00_04\firmware\mmwave_dfp\]]
    local rfeval_firmware = firmware_directory_base .. [[rfevalfirmware\appss\mmwave_plt_rfeval_rprc.bin]]
    local rfs_firmware = firmware_directory_base .. [[rfsfirmware\xWRL6432\mmwave_rfs_rprc.bin]]
    local atecal_firmware = firmware_directory_base .. [[rfevalfirmware\rfsatecal\xWRL6432\mmwave_rfs_atecal_rprc.bin]]
    
    local c_boardType = 0  -- 0=EVM, 1=CZ
    
    local rs232_com_port = 13
    
    -- Chirp mode setup and RX data capture
    local num_rx_channels = 3
    
    -- 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--2.2 Use 87 for a 4G BW. 
    local Tx_BO = 3
    
    -- Chirp/profile common configuration
    local rf_start_freq_mhz = 60000
    local num_samples_per_chirp = 128
    local slope_MHzpus = 47.95
    local Sampling_Rate_Decimator = 15 -- 23   100/Sampling_Rate_Decimator is the Sampling Rate, MHz
    local ramp_end_time_us = 34 -- 36.1
    local idle_time_us = 6
    local tx_start_time_us = 1
    local adc_start_time_us = 3.9
    local Num_Skip_Samples = 26
    local MIMO_mode = 1 -- 0, manual 1:tdm-mimo, 4: BPM-MIMO
    local Tx_enable = 3 -- 1: Tx 1 enable, 2: Tx2 enable, 3: Tx1 & Tx2 enable. 
    local hpf_sel = 3 -- HPF corner frequency 0: 175KHz; 1: 350KHz; 2:700KHz; 3: 1400KHz
    local hpf_fast_init_duration_us = 1.5
    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
    
    
    local frame_period_us = 200000
    local burst_period_us = 600 -- need to >= (num_chirp_per_burst * (idleTime + RampTime) + 100us)
    local num_burst_per_frame = 64
    local num_chirp_per_burst = 2
    local num_frames = 600
    
    -----------------------------------------------------------
    
    
    -- Check that Matlab Postproc is at least version 5.02
    local postproc_version = tonumber(mws.GetPostProcVersion())
    if (postproc_version < 5.02) then
        error("ERROR: Matlab Postproc must be at least version 5.02")
    end
    
    -- Reset studio internal variables
    status = mws.ftdiResetAllDevices()
    
    
    -- Board config
    
    xw_status = mws.selectBDType(c_boardType, 0, 0, 0)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.selectComIfType(1, 1000, 0, 2, 0)
    assert(xw_status == 0, "ERROR: API failed")
    
    -- DCA1000 config
    xw_status = mws.SelectCaptureDevice("DCA1000")
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.captureCardCfgResetFPGA()
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.captureCardEthernetCfg("192.168.33.30", "192.168.33.180", "12.34.56.78.90.12", 4096, 4098, 1)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.captureCardModeCfg(1, 1, 1, 2, 1, 25)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, s_version, s_dllVersion = mws.getCaptureCardFPGAVersion()
    assert(xw_status == 0, "ERROR: API failed")
    
    
    -- SOP config
    xw_status = mws.sopControl(0, 3)
    assert(xw_status == 0, "ERROR: API failed")
    
    
    
    -- Device reset
    xw_status = mws.nReset(0)
    assert(xw_status == 0, "ERROR: API failed")
    
    
    -- RS232 connect
    xw_status = mws.rs232Config(0, rs232_com_port, 0, 0)
    assert(xw_status == 0, "ERROR: API failed")
    
    -- Load firmware
    xw_status = mws.sopDebugFwPreBootCfg(0, 1, 0, 0)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.fwRprcDownload(0, 2, rfeval_firmware)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.sopDebugFwPostBootCfg(0, 0, 0, 0, 0, 0)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.fwRprcDownload(0, 0, rfs_firmware)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status = mws.fwRprcDownload(0, 1, atecal_firmware)
    assert(xw_status == 0, "ERROR: API failed")
    
    -- Powerup device
    xw_status, t_deviceStatus = mws.devicePowerup(0, 0, 0, 0)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status=mws.fecDevicePowerOn(0,{h_XtalClkFreq=10240,c_ClkSourceSel=10,c_PowerMode=0,c_ChirpTimerResol=0,c_FecBootCfg=0,h_Reserved2=0,w_Reserved3=0})
    assert(xw_status == 0, "ERROR: API failed")
    
    -- Special calibration configuration
    xw_status, response=mws.rfEvalAteInit(0,{c_AteInitAddress=2129856,w_Reserved=0})
    assert(xw_status == 0, "ERROR: API failed")
    xw_status=mws.fecRfsDbgCtrl(0,{w_RfsDbgLogAddress=575029248,w_Reserved0=0,w_Reserved1=0})
    assert(xw_status == 0, "ERROR: API failed")
    
    -- Setup clocks
    xw_status=mws.fecDevClkctrl(0,{c_DevClkCtrl=10,c_FtClkCtrl=0,c_ApllClkCtrl=170,c_Reserved1=0,w_Reserved2=0})
    assert(xw_status == 0, "ERROR: API failed")
    
    
    
    
    ------------------------------------------------------------------------------------------------------------------------------------
    
    
    
    -- 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")
    
    
    
    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")
    
    
    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")
    
    -- Frame configuration
    
    xw_status, burst_period_code = mws.sensConvTimeToCode(0,0,burst_period_us)
    assert(xw_status == 0, "ERROR: API failed")
    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")
    

    test_cfg.cfg

    I found that setting factoryCalibcfg 2nd value to 0 disables rxGain and backoff0. Would it be coming from this, if so, what should it be to be the same as lua script? Is there any more difference that may cause the issue?

    I really appreciate your help.

    Best,

    Seho Kim

  • Hello Seho,

    1. Set rf_fact_cal_start_freq_mhz to 60000

    2. Set cali_slope_MHzpus to 47.95

    You're calibrating for something different than your chirp design. There may be a few more differences and or settings that could cause the DCA1000 output to look different than the .cfg output, but those are a few. Feel free to use this LUA script as a guide which we provide in the Radar Toolbox.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/1023/1738.IWRL6432_5F00_capture.lua

    Best Regards,

    Pedrhom

  • Hi Pedrhom,

    Thank you very much for checking the scripts.

    I am now curious about the calibration part. I was using the value C:\ti\mmwave_studio_04_01_00_06\mmWaveStudio\Scripts\MatlabExamples\LUA_examples

    This has rf_start_freq_mhz = 60000, but rf_fact_cal_start_freq_mhz = 61000 and cali_slope_MHzpus = 2.2

    Why is example script using this value?

    Also, using that lua script had a lot better results, but then if I change those values to what you suggested, wouldn't both DCA1000EVM setup and SPI setup have noisy data instead of both having good data? Due to this, I am curious if I can keep those values on lua script, and instead change corresponding values in cfg to be the same as lua script. How can I achieve this?

    Best Regards,

    Seho

  • Hello Seho,

    That example is older and for a different version of silicon. Not exactly sure why but please have calibration match what is to be used for data capture. Could you send some visualizations of the range-azimuth-angle heatmaps and show how they differ from one another?

    Best Regards,

    Pedrhom