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: Is there an API to read back the "Chirp config API parameters" from the radar?

Part Number: MMWCAS-DSP-EVM

We need to configure the Chirp Parameters differently, depending on the device Id. 

The example code "mmwave_dfp_02_02_03_01\ti\example\mmWaveLink_Cascade_Example" allows Chirp Parameters to be configured as follows (see mmwaveconfig.txt file below)
But there is no way here to specify the device ID for these Chirp Parameters.  

The "int MMWL_chirpConfig(unsigned char deviceMap)" function sends the chirp parameters to all 4 devices (deviceMap = 15) :
    retVal = CALL_API(API_TYPE_C | SET_CHIRP_CONFIG_IND, deviceMap, &setChirpCfgArgs[0U], 2U);


#Chirp Configuration parameters, please modify if needed.
#rlChirpCfg_t
#
chirpStartIdx=0;
chirpEndIdx=8;
profileIdCPCFG=0;
startFreqVar=0;
freqSlopeVar=0;
idleTimeVar=0;
adcStartTimeVar=0;
txEnable=0;
#END

#
#Chirp Configuration parameters, please modify if needed.
#rlChirpCfg_t
#
chirpStartIdx=0;
chirpEndIdx=0;
profileIdCPCFG=0;
startFreqVar=0;
freqSlopeVar=0;
idleTimeVar=0;
adcStartTimeVar=0;
txEnable=4;
#END

#
#Chirp Configuration parameters, please modify if needed.
#rlChirpCfg_t
#
chirpStartIdx=1;
chirpEndIdx=1;
profileIdCPCFG=0;
startFreqVar=0;
freqSlopeVar=0;
idleTimeVar=0;
adcStartTimeVar=0;
txEnable=2;
#END

I modified the MMWL_chirpConfig() code to select the device IDs individually (15, 8,4,2,1), like this:

retVal = CALL_API(API_TYPE_C | SET_CHIRP_CONFIG_IND, 0x0F, &setChirpCfgArgs[0], 1U);
retVal = CALL_API(API_TYPE_C | SET_CHIRP_CONFIG_IND, 0x08, &setChirpCfgArgs[1], 1U);
retVal = CALL_API(API_TYPE_C | SET_CHIRP_CONFIG_IND, 0x04, &setChirpCfgArgs[2], 1U);
etc

Will this work?

The first Chirp section is used to set chirps 0-8 for all 4 devices with a txEnable of zero for devices (8,4,2,1)
The next Chirp section is used to set chirp 0, device 0x8 only, to have a txEnable=4 for only Device 4 
The next Chirp section is used to set chirp 1, device 0x4 only, to have a txEnable=2 for only Device 3
etc.

What is the meaning of the '1U' last parameter in the API call above?

Also, is there an API to read back the Chirp Parameters like there is to read back the Profile Config parameters?

I need an API for "GET_CHIRP_CONFIG_IND" so I can read the Chirp RAM from the 4 radar devices and see if is what I expected.

In other words, is there a GET CHIRP CONFIG similar to this GET PROFILE CONFIG?

retVal = CALL_API(API_TYPE_C | GET_PROFILE_CONFIG_IND, devId, &getProfileCfgArgs_AdvChirp[j], j);

Regards Eddie

  • Hi Eddie,

    Please look for rlGetChirpConfig API in mmwavelink (rl_sensor.c/.h) to read back the configured chirp parameters.

    Regards,

    Jitendra

  • Thanks for the reply.   

    I am able to call rlGetChirpConfig(...) to read back the Chirp parameters.  I want to use this call to verify the rlSetChirpConfig(...) call.
    What I really need to do is set the Chirp TX Enables like is done in the mmWave Studio: "Cascade_Configuration_MIMO.lua" script.
    This script allows the user to set the configure the chirp parameters: tx0Enable, tx1Enable, tx2Enable based on Device ID as seen below

    --[[
    Function to configure the chirps specific to a device
    12 chirps are configured below, individually for each AWR device
    |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
    |       | 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)
    ...


    The code I am using (...ti\example\mmWaveLink_Cascade_Example) does not call APIs like "rlSetChirpConfig(...)", but instead calls:
    retVal = CALL_API(API_TYPE_C | SET_CHIRP_CONFIG_IND, deviceMap2[i], &setChirpCfgArgs[i], 1U);

    Question 1
    Is there a difference in the calls: CALL_API(....) vs rlSetChirpConfig(...)?

    Question 2
    Can I can make calls like this to set the chirp's TX Enable based on DeviceId?

    /* With this API we can configure max 512 chirp in one call */

    // ------  Chirp 0 configuration ---------- //
    setChirpCfgArgs[0U].chirpStartIdx =0;
    setChirpCfgArgs[0U].chirpEndIdx = 0;
    setChirpCfgArgs[0U].txEnable = 4;

    // Set chirp 0 to only enable Device 4's TX Enable 2, all remaining 11 TX enables OFF for chirp 0
    retVal = rlSetChirpConfig(8U, 1U, &setChirpCfgArgs[0U]);

    // ------  Chirp 1 configuration ---------- //
    setChirpCfgArgs[0U].chirpStartIdx =1;
    setChirpCfgArgs[0U].chirpEndIdx = 1;
    setChirpCfgArgs[0U].txEnable = 2;

    // Set chirp 1 to only enable Device 4's TX Enable 1, all remaining 11 TX enables OFF for chirp 0
    retVal = rlSetChirpConfig(8U, 1U, &setChirpCfgArgs[0U]);

    // ------  Chirp 2 configuration ---------- //
    setChirpCfgArgs[0U].chirpStartIdx =2;
    setChirpCfgArgs[0U].chirpEndIdx = 2;
    setChirpCfgArgs[0U].txEnable = 1;

    // Set chirp 2 to only enable Device 4's TX Enable 0, all remaining 11 TX enables OFF for chirp 0
    retVal = rlSetChirpConfig(8U, 1U, &setChirpCfgArgs[0U]);

    .... etc

    Thank you in advance for helping with these 2 questions
    Regards Eddie

  • Hi Eddie,

     CALL_API is via function pointer, yes you can directly make a call to rlSetChirpConfig or any other mmwavelink APIs with right set of structure parameters.

    Regards,

    Jitendra

  • Thanks for the response to question 1 above.  That answered question 1, Thanks!

    Regarding question  2 and the behavior of :  rlSetChirpConfig(..) and rlGetChirpConfig()

    retVal = rlSetChirpConfig(deviceMap, 2U, &setChirpCfgArgs[0U]); 

    If deviceMap is 0xF
    Does the setChirpCfgArgs() image get transferred to the CHIRP RAM for each of the four devices?

    If deviceMap is 0x8 (device  #4 only)
    Does the setChirpCfgArgs() image get transferred to the CHIRP RAM for device 4 only, leaving the other 3 the same?

    For the read back case:

    retVal = rlGetChirpConfig(deviceMap, setChirpCfgArgs[0].chirpStartIdx,
    setChirpCfgArgs[0].chirpStartIdx + MAX_GET_CHIRP_CONFIG_IDX, &getChirpCfgArgs[0]);

    If deviceMap is 0xF, how do the 4 device CHIRP RAM data sets get read back into getChirpCfgArgs?

    Does each device have its own CHIRP RAM and PROFILE RAM?

    regards Eddie

  • Hi Eddie,

    Each device stores the chirp configuration which is being set using rlSetChirpConfig API to that specific device. All the AWR stores all the chirp/profile config in its CHIRP and PROFILE RAM, so when you read from each device it will return its own stored config data.

    For rlGetChirpConfig API, you need to invoke it with single index at a time while calling to each AWR device. 

    Regards,

    Jitendra

  • Thanks for the feedback, this answers my question