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.

AWR2944EVM: How to Enable per chirp Phase shift?

Part Number: AWR2944EVM
Other Parts Discussed in Thread: AWR1843, AWR2944

Tool/software:

Hi ,

From AWR1843 MRR example, it can enable per chirp Phase shift.

We use the same method on AWR2944 for TX beamforming, but it return error code(114) as below

What's the difference we need to check on AWR2944? 

Is it possible about device map for AWR2944

rlRfSetMiscConfig(RL_DEVICE_MAP_INTERNAL_BSS, (rlRfMiscConf_t *)phaseShiftPerChirpEnable);

AWR2944 radar config:

profileCfg 0 77 2 3.5 15.33 0 0 8.883 0 256 30000 0 0 42
chirpCfg 0 255 0 0 0 0 0 15
frameCfg 0 255 1 0 256 50 1 0

void Cfg_TxPhaseShiftInitParams(rlRfPhaseShiftCfg_t *ptrtxPhaseShiftCfg, uint8_t tx0PhShCode, uint8_t tx1PhShCode, uint8_t tx2PhShCode, uint8_t tx3PhShCode)
{
/* Initialize the configuration: */
memset((void *)ptrtxPhaseShiftCfg, 0, sizeof(rlRfPhaseShiftCfg_t));

//AWR2944, 4TX/4RX
ptrtxPhaseShiftCfg->chirpStartIdx = 0;
ptrtxPhaseShiftCfg->chirpEndIdx = 255;
ptrtxPhaseShiftCfg->tx0PhaseShift = tx0PhShCode;
ptrtxPhaseShiftCfg->tx1PhaseShift = tx1PhShCode;
ptrtxPhaseShiftCfg->tx2PhaseShift = tx2PhShCode;
ptrtxPhaseShiftCfg->tx3PhaseShift = tx3PhShCode;
return;
}

//---------------------------------------------------------------------------------------------

AWR1843 MRR:

/*! \brief
* Radar RF Miscconfiguration
*/
typedef struct rlRfMiscConf
{
/**
* @brief b0 PERCHIRP_PHASESHIFTER_EN \n
* 0 Per chirp phase shifter is disabled \n
* 1 Per chirp phase shifter is enabled \n
* This control is applicable only in devices which support phase shifter. \n
* For other devices, this is a RESERVED bit and should be set to 0.
*/
rlUInt32_t miscCtl;
/**
* @brief Reserved for Future use
*/
rlUInt32_t reserved;
}rlRfMiscConf_t;

/********************************************************************************
* Set Per Chirp Configuration
********************************************************************************/
phaseShiftPerChirpEnable->miscCtl = 1; // Enable per chirp Phase shift
retVal = rlRfSetMiscConfig(RL_DEVICE_MAP_INTERNAL_BSS, (rlRfMiscConf_t *)phaseShiftPerChirpEnable);

Get_PhaseTxShifterCodeValue(0U, &txph1Code, &txph2Code, &txph3Code);
Cfg_TxPhaseShiftInitParams((rlRfPhaseShiftCfg_t *)txphaseshiftCfg, txph1Code, txph2Code, txph3Code);
retVal = rlRfSetPhaseShiftConfig(RL_DEVICE_MAP_INTERNAL_BSS, 1U, (rlRfPhaseShiftCfg_t *)txphaseshiftCfg);

//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks

BRs

Bruce

  • Hi Bruce,

    The code is similar for AWR2944 device as well. Can you specify what data are you passing to the function AWR_RF_RADAR_MISC_CTL_SB when you call this API. Also i hope you are issuing this API first in the sequence before the phaseshifter API is called. 

    Also, can you let us know when do you receive the error? Is it after you call the phase shifter API or any other API. 

    Thanks,

    Pradipta.

  • Hi Pradipta,

      What's function AWR_RF_RADAR_MISC_CTL_SB? It seems not a API.

    Thanks

    BRs

    Bruce

  • Hi Bruce, 

    The ICD captures the below API with the AWR_RF_RADAR_MISC_CTL_SB name. 

    rlRfSetPhaseShiftConfig(RL_DEVICE_MAP_INTERNAL_BSS, 1U, (rlRfPhaseShiftCfg_t *)txphaseshiftCfg);

    Thanks,

    Pradipta. 

  • HI Pradipta,

    I checked rl_sensor.h, AWR_RF_RADAR_MISC_CTL_SB seems relate to rlRfSetMiscConfig().

    Anything I misunderstand?

    /* Sub block ID: 0x0087, ICD API: AWR_RF_RADAR_MISC_CTL_SB */
    /* DesignId : MMWL_DesignId_052 */
    /* Requirements : AUTORADAR_REQ-891 */
    rlReturnVal_t rlRfSetMiscConfig(rlUInt8_t deviceMap, rlRfMiscConf_t* data)

    /* Sub block ID: 0x0106, ICD API: AWR_PERCHIRPPHASESHIFT_CONF_SB */
    /* DesignId : MMWL_DesignId_045 */
    /* Requirements : AUTORADAR_REQ-798 */
    rlReturnVal_t rlRfSetPhaseShiftConfig(rlUInt8_t deviceMap, rlUInt16_t cnt,
    rlRfPhaseShiftCfg_t* data)

  • Hi Bruce,

    I am asking here

    1) What are the parameters you as an user have passed when you are calling this API. What is in the data pointer.

    Thanks,

    Pradipta.

  • Hi Pradipta,  

     

    I passed the parameters as below when I call rlRfSetPhaseShiftConfig().

    volatile rlRfPhaseShiftCfg_t g_ptrtxPhaseShiftCfg = { 0 };

    static void MmwDemo_applyPhShift(void* args)
    {
    uint32_t retVal = RL_RET_CODE_OK;
    int32_t errCode = 0;
    rlRfMiscConf_t phaseShiftPerChirpEnable[1] = { 0 };

    while (1)
    {

    SemaphoreP_pend(&gMmwMssMCB.phShftSemHandle, SystemP_WAIT_FOREVER);

    retVal = rlRfSetPhaseShiftConfig(RL_DEVICE_MAP_INTERNAL_BSS, 1U, (rlRfPhaseShiftCfg_t *)&g_ptrtxPhaseShiftCfg);

    if (retVal != RL_RET_CODE_OK)
    {
    CLI_write("Error: Unable to configure per chirp phase shift [Error %d]\n", retVal);
    }

    }
    }


    static void ChirpStartISR (void* arg)
    {

      gMmwMssMCB.chirpInt++;

      uint8_t tx1phcode, tx2phcode, tx3phcode, tx4phcode;

      if (gCLIMMWaveControlCfg.dfeDataOutputMode == MMWave_DFEDataOutputMode_FRAME){

         if (gMmwMssMCB.chirpInt == gCLIMMWaveControlCfg.u.frameCfg[0].frameCfg.chirpEndIdx)
         {   
            CLI_write ("ChirpStartISR.chirpInt = %d \n",gMmwMssMCB.chirpInt );
         }

        /* Total Chirp Number = ( ChirpEnd - ChirpStart + 1) * NumberLoops */
       if (gMmwMssMCB.chirpInt == ((gCLIMMWaveControlCfg.u.frameCfg[0].frameCfg.chirpEndIdx -       gCLIMMWaveControlCfg.u.frameCfg[0].frameCfg.chirpStartIdx + 1) * gCLIMMWaveControlCfg.u.frameCfg[0].frameCfg.numLoops))
      {

        Get_PhaseTxShifterCodeValue(0U /*gMmwMssMCB.steer_Angle*/, &tx1phcode, &tx2phcode, &tx3phcode, &tx4phcode);
        Cfg_TxPhaseShiftInitParams(&g_ptrtxPhaseShiftCfg, tx1phcode, tx2phcode, tx3phcode, tx4phcode);
         SemaphoreP_post(&gMmwMssMCB.phShftSemHandle);
        gMmwMssMCB.chirpInt = 0;
       }
      }
    }

  • Hi Bruce,

    I checked this at my end and for me it was working. I have tried two strategies

    1) Phase Shift applied via the Set Profile API.

    2) Using the per chirp phase shift API.

    Can you let me know which DFP version you are using at your end?

    Thanks,

    Pradipta.

  • Hi Pradipta

    1) Phase Shift applied via the Set Profile API. => Waht's the API name?

    2) Using the per chirp phase shift API. => Waht's the API name?

    Thanks

    BRs

    Bruce

  • Hi Bruce,

    Please find my comments below. 

    1) AWR_PROFILE_CONF_SET_SB

    2) AWR_PERCHIRPPHASESHIFT_CONF_SB

    Thanks,

    Pradipta.

  • Hi Pradipta,

    1) Phase Shift applied via the Set Profile API. => Why not  AWR_RF_RADAR_MISC_CTL_SB ? Sets misc feature such as per chirp phase shifter.

    Thanks

    BRs

    Bruce

  • Hi Bruce,

    The device has multiple ways of applying the phase shift. Misc API is for the 2nd case. 1st case only requires the set profile API. Please read the ICD for more details on this. 

    Thanks,

    Pradipta.