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.

Compiler/AWR1642BOOST: bpmChirpCfg.constBpmVal Question

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642

Tool/software: TI C/C++ Compiler

Hi there,

The below BPM code is for the AWR1642. I have a question for the BpmVal. I understand how =0U means 0 unsigned (so 0deg phase shift). But, what does =0xCU mean? 0xC in hex is 12 in decimal and 1100 in binary. How does TI get 180 degrees phase shift from that 0xCU BpmVal? Thank you!

George

            /*configure chirp 0 (++)*/
            memset ((void *)&bpmChirpCfg, 0, sizeof(rlBpmChirpCfg_t));
            bpmChirpCfg.chirpStartIdx = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp0Idx; 
            bpmChirpCfg.chirpEndIdx   = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp0Idx; 
            /* Phase configuration: TX0 positive, TX1 positive*/ 
bpmChirpCfg.constBpmVal = 0U; bpmChirpHandle = MMWave_addBpmChirp (gMmwMssMCB.ctrlHandle, &bpmChirpCfg, &errCode); if (bpmChirpHandle == NULL) { System_printf ("Error: Unable to add BPM cfg chirp 0. Subframe %d [Error code %d]\n",subframe, errCode); return -1; } /*configure chirp 1 (++)*/ memset ((void *)&bpmChirpCfg, 0, sizeof(rlBpmChirpCfg_t)); bpmChirpCfg.chirpStartIdx = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp1Idx; bpmChirpCfg.chirpEndIdx = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp1Idx; /* Phase configuration: TX0 positive, TX1 negative*/ bpmChirpCfg.constBpmVal = 0xCU; bpmChirpHandle = MMWave_addBpmChirp (gMmwMssMCB.ctrlHandle, &bpmChirpCfg, &errCode); if (bpmChirpHandle == NULL) { System_printf ("Error: Unable to add BPM cfg chirp 1. Subframe %d [Error code %d]\n",subframe, errCode); return -1; }

  • Hello George,

    Please refer detail of constBpmVal parameter in ti\control\mmwavelink\include\rl_sensor.h

    /**
    * @brief b0 CONST_BPM_VAL_TX0_TXOFF \n
    Value of Binary Phase Shift value for TX0, when during idle time \n
    b1 CONST_BPM_VAL_TX0_TXON \n
    Value of Binary Phase Shift value for TX0, during chirp \n
    b2 CONST_BPM_VAL_TX1_TXOFF \n
    Value of Binary Phase Shift value for TX1, when during idle time \n
    b3 CONST_BPM_VAL_TX1_TXON \n
    Value of Binary Phase Shift value for TX1, during chirp \n
    b4 CONST_BPM_VAL_TX2_TXOFF \n
    Value of Binary Phase Shift value for TX2, when during idle time \n
    b5 CONST_BPM_VAL_TX2_TXON \n
    Value of Binary Phase Shift value for TX2, during chirp \n
    b15:6 Reserved \n
    */
    rlUInt16_t constBpmVal;

    0xC value means Tx1 phase shift is being set to 180 degree (during idle/chirp time), i.e. Tx0 is +ve and Tx1 is -ve wrt to each other.

     

    Regards,

    Jitendra

  • Hi Jitendra,

    Thank you very much for your response!

    Can you confirm my thinking below:

    I have a 16-bit register: (b15, b14,....,b3,b2,b1,b0).
    b0 and b1 are bits for antenna 1
    b2 and b3 are bits for antenna 2
    b4 and b5 are bit for antenna 3

    Therefore, if I wanted to change the phase of antenna 2 to 180deg while other antennas have
    zero phases, I would set
    b0 = b1 = 0
    b2 = b3 = 1
    b4 = b5 = 0
    So, the bit string is: (b3 b2 b1 b0) = (1, 1, 0,0). This is 0xC.

    My understanding is that if you want antenna 1 to have 180 phase while
    other antennas are 0 phase, then I need to do:
    (b3 b2 b1 b0) = (0 0 1 1) = 0x3

    If you want all the antennas to have 180 phase, then you need to do
    (b5 b4 b3 b2 b1 b0) = (1 1 1 1 1 1) = 0x3F
    assuming the reserved bits b6 to b15 are zeros.

    A confirmation would be great, thanks!

    George

  • Hello George,

    Yes, your understanding is correct here.

    Regards,

    Jitendra

  • Hi Jitendra,

    Great, thank you!

    George