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.

MMWCAS-DSP-EVM: how to obtain 1millisecond of inter frame interval?

Part Number: MMWCAS-DSP-EVM
Other Parts Discussed in Thread: AWR2243, TDA2

Hi,

I realise the way TI's mmWave cascade card is configured is such that there is a minimum inter frame interval I can set depending on the chirp waveform.

So to achieve 1 millisecond of inter frame interval, I have reduced the number of chirps per loop to 16 (can't seem to be lower if not the data extraction process gives some error of log2(x) > 3). However, the inter frame interval that I can achieve is only 7 millisecond minimal for now.

So I want to know what else can/should I configure in the LUA script to achieve this level of 1 millisecond inter frame interval. I believe there's this setting of start_chirp_tx and end_chirp_tx that is restricting the number of chirps per frame but I've no clue what it represents and I've left it to the default setting of 0 and 11 respectively (if any lower the data extraction code throws array size changing error as well).

Please advise how should I proceed. Thanks!

  • Hi,

    What is

    • the chirp idle time
    • chirp duration

    You would need to reduce the number of chirps in order to use 1ms inter frame interval.

    thank you

    Cesar

  • Hi,

    My chirp config is as follows:

    • Chirp duration = adc_samples/sample_freq = 25.6ms
    • idle_time = 3.5ms
      adc_start_time = 4ms
      ramp_end_time = 30ms
      I have no idea how to reduce the number of chirps further other than reducing nchirp_loops to 16 (can't seem to go lower). What else can I change in the LUA config file for reducing number of chirps?
      Regards,
      Simon
  • Hi,

    The cascade board has 4 sensors. Are you able to use a single AWR2243 sensor only?

    It is possible that there is a limitation for min nchirp_loops=16 for cascade setup

    thank you

    Cesar

  • Hi,

    I can't seem to operate only a single AWR2243 sensor without throwing some error in the configuration code.

    Also, my goal is to use the MIMO ability to beamform which thus requires all the channels to capture with 1ms PRI..

    Regards,
    Simon

  • Hi,

    Can you please share the LUA config file?

    Thank you

    Cesar

  • --[[
    Sequence being followed
    
    A. 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 Config
    
    NOTE:
    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
    --]]
        
    -- optional flag to run whole configuration of MMWCAS-RF-EVM or just the device config (after firmware and RF connect)
    runConfiguration = 1
    
    ----------------------------------------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_03_01\\firmware\\xwr22xx_metaImage.bin"
    -- For Simon's devices
    -- metaImagePath            =   "C:\\Users\\User\\Documents\\TARF\\ti\\mmwave_dfp_02_02_03_01\\firmware\\xwr22xx_metaImage.bin"
    
    -- IP Address for the TDA2 Host Board
    -- Change this accordingly for your setup
    
    TDA_IPAddress     =   "192.168.33.180" -- originally 192.168.33.180
    
    -- Device map of all the devices to be enabled by TDA
    -- 1 - master ; 2- slave1 ; 4 - slave2 ; 8 - slave3
    
    deviceMapOverall  =   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 bringup
    
    test_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 are 
                            different 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 ,77GHz to 78.5 Ghz
    local slope                     =   30     -- SRR: 15, USSR: 30; MHz/us, SRR:0.75Ghz, USSR:1.5Ghz BW, 
    local idle_time                 =   3.5    -- us, >1GHz & <2GHz: 3.5us, >2GHz & <3GHz: 5us
    local adc_start_time            =   4      -- us
    local adc_samples               =   256    -- 128 or 256 Number of samples per chirp
    local sample_freq               =   10000  -- ksps, or 10Msps or 10MHz
    local ramp_end_time             =   30     -- us, results in 51us*60MHz/us=3.06GHz; c/2Bw=49mm
    local rx_gain                   =   48     -- dB, adjustable for power difference to prevent saturation
    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 configuration
    local start_chirp_tx            =   0
    local end_chirp_tx              =   11   -- reduce to 2-device cascade mode?; originally 11; numChirpsPerFrame = (end_chirp_tx-start_chirp_tx)*nchirp_loops = 12*16 = 192
    local nchirp_loops              =   16   -- Number of chirps per frame; 12 chirps * 16 chirp_loops = 192 chirp_frames?; originally 128 chirps; must be log(x)>3
    local nframes_master            =   256  -- Number of Frames for Master; 0 for infinite frames
    local nframes_slave             =   256  -- Number of Frames for Slaves; 0 for infinite frames
    local Inter_Frame_Interval      =   7    -- ms (minimally 100ms for 10 frames); same as periodicity; adjust for longer PRI i.e. 1 or 2ms instead
    local trigger_delay             =   0    -- us
    local trig_list                 =   {1,2,2,2} -- 1: Software trigger, 2: Hardware trigger    
    -- configure to use frames for milisecond PRI
    
    --[[
    Function to configure the chirps specific to a device
    12 chirps are configured below, individually for each AWR device
    -- BPM structure? or TDM MIMO?
    |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
    |       | Dev 1 | Dev 1 | Dev 1 | Dev 2 | Dev 2 | Dev 2 | Dev 3 | Dev 3 | Dev 3 | Dev 4 | Dev 4 | Dev 4 |
    | Chirp |  TX0  |  TX1  |  TX2  |  TX 0 |  TX1  |  TX2  |  TX0  |  TX1  |  TX2  |  TX0  |  TX1  |  TX2  |
    |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
    |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |
    |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |
    |     2 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |
    |     3 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |
    |     4 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |
    |     5 |     0 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |
    |     6 |     0 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |
    |     7 |     0 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |
    |     8 |     0 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |
    |     9 |     0 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |
    |    10 |     0 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |
    |    11 |     1 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |     0 |
    |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
    --]] 
    -- Note: The syntax for this API is:
    -- ar1.ChirpConfig_mult(RadarDeviceId, chirpStartIdx, chirpEndIdx, profileId, startFreqVar, 
    --                      freqSlopeVar, idleTimeVar, adcStartTimeVar, tx0Enable, tx1Enable, tx2Enable)
    

    Hi,

    Hope this segment of the LUA code config script will help in the debugging. Thanks!

    Regards,

    Simon

  • Hi,

    Is this LUA script from TI or did you generate you own?

    The information I am trying to see is what kind of Frame Configuration API is used.

    Are you using Advanced Frame Configuration? Are you using Advanced Chirp Configuration?

    The limitation for the configuration are documented in the Radar Interface Control Document

    C:\ti\mmwave_dfp_02_02_03_01\docs\mmWave-Radar-Interface-Control.pdf

    thank you

    Cesar

  • Hi,

    This script is from TI under mmWaveStudio/Scripts/Cascade/Cascade_Configuration_MIMO. I just did some alteration to the parameters inside so as to configure for my use case.

    I have no idea whether I'm using advanced frame configuration or advanced chirp configuration since I never change anything other than the cascade configuration MIMO file as mentioned earlier..

    Also, this radar interface control document is too complicated for me to understand.. can you break down where I can find the limitation to the frame periodicity and how to resolve/work around it? Thanks!

    Regards,

    Simon

  • Thank you,

    How did you modify these lines

    -- Frame Configuration
    -- Master
    if (0 == ar1.FrameConfig_mult(1,start_chirp_tx,end_chirp_tx,nframes_master, nchirp_loops,
                                  Inter_Frame_Interval, 0, 1)) then
        WriteToLog("Master : Frame Configuration successful\n", "green")
    else
        WriteToLog("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)) then
        WriteToLog("Slaves : Frame Configuration successful\n", "green")
    else
        WriteToLog("Slaves : Frame Configuration failed\n", "red")

    Cesar

  • Hi,

    So I never touch these lines directly, but rather change the parameters/arguments inside the ar1.FrameConfig_mult function, namely the start_chirp_tx, end_chirp_tx, nframes_master, nframes_slave, nchirp_loops and Inter_Frame_Interval as attached in the previous code segment that I posted before. 

    Regards,

    Simon

  • Thank you

    Can you please provide the error log you get. At what point in the process do you see this error? Is it during the configuration?

    It seems to me that the configuration should be fine

    "(can't seem to be lower if not the data extraction process gives some error of log2(x) > 3)"

    Thank you

    Cesar

  • Nope the error is not in the configuration part i.e. I can still run the LUA script and collect data. It is during the extraction process in MATLAB that the error occurs as follow:

    Array indices must be positive integers or logical values.

    Error in test1_param (line 223)
    DopplerProcClutterRemove_scaleFactorDoppler = scaleFactor(log2(DopplerFFTSize) - 3);

    Error in run (line 91)
    evalin('caller', strcat(script, ';'));

    Error in Module/loadParameters (line 36)
    run(obj.pfile);

    Error in Module (line 88)
    obj = loadParameters(obj);

    Error in simTopCascade (line 54)
    obj@Module(varargin{:});

    Error in MIMO_dataExtraction (line 32)
    simTopObj = simTopCascade('pfile', pathGenParaFile);

    In this case I set number of chirps per loop in the config during collection to be 8, so the DopplerFFTSize here is 8 and log2(8) - 3 = 0, which causes scaleFactor(0) to throw the error above...

  • Thank you

    This makes sense because the configuration is correct.

    The Matlab Examples provided do not support a small number of chirps (less than 16).

    For the special configuration you would have to write your own Matlab processing or modify the examples provided

    thank you

    Cesar

  • I see.. Can get some advice on how to change up the MATLAB processing script for small number of chirps? I'm just afraid I will extract the data wrongly or incur some unforeseen error.. If you have any available scripts that account for these changes that'll be great! Thanks.

  • Hi,

    Unfortunately the team that developed the scripts is no longer available for support.

    The Matlab scripts are provided for reference and can be modified as desired.

    thank you

    Cesar

  • Okay I see. But to confirm with you this is doable right? like extracting smaller number of chirp than what has been predefined as 'default'..

  • Yes,

    The generated raw data is correct. You would need to modify the matlab scripts to read the data

    thank you

    Cesar

  • Can I check why even if I change away the log2(x)>3 problem mention earlier, there is still error in the extraction process in the read_ADC_bin_TDA2_separateFiles.m script, where the Expected_Num_SamplesPerFrame differ from the actual adcData1 from the binary file which results in the reshape step error afterwards.

  • Hi,

    Unfortunately I don't have sufficient knowledge of the matlab script to answer this question.

    My understanding is that the matlab script was developed for the use case log2(x)>3.

    I think you need to understand the matlab code and modify it for your use case

    thank you

    Cesar

  • Hmm I see... but the problem is not with the MATLAB code but with how the data is stored in the binary file since there is a mismatch in size. Do you happen to know if the data is supposed to be stored equally across the master and 3 slave binary files for all frames?

  • Yes,

    As shown in the User Guide there are separate bin files for each sensor: master and 3 slave binary files

    C:\ti\mmwave_studio_03_00_00_14\docs\mmwave_studio_cascade_user_guide.pdf

    Thank you

    Cesar