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: Increasing BPM Scheme to more than 2 chirps in mss_main.c

Part Number: AWR1642BOOST

Tool/software: TI C/C++ Compiler

Hi,

I notice in mss_main.c that the current BPM scheme has two chirps, which makes sense since the scheme is A+B for chirp one and A-B for chirp 2. Seen below...

int32_t MmwDemo_bpmConfig(void)
{
    uint8_t                subframe;
    uint8_t                numberOfSubframes = 1;
    int32_t                errCode;
    rlBpmChirpCfg_t        bpmChirpCfg;
    MMWave_BpmChirpHandle  bpmChirpHandle;
    
    if(gMmwMssMCB.cfg.ctrlCfg.dfeDataOutputMode == MMWave_DFEDataOutputMode_ADVANCED_FRAME)
    {
        /* BPM configuration for all valid subframes */
        numberOfSubframes = gMmwMssMCB.cfg.ctrlCfg.u.advancedFrameCfg.frameCfg.frameSeq.numOfSubFrames;
    }

    for(subframe = 0; subframe < numberOfSubframes; subframe++)
    {
        /* Is BPM enabled*/
        if(gMmwMssMCB.cliCfg[subframe].bpmCfg.isEnabled)
        {
            /*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;
            }
        }

What if I want to increase the BPM scheme to include 4 chirps? Would I just create two more blocks (as such below) with different chirp indexes?

    for(subframe = 0; subframe < numberOfSubframes; subframe++)
    {
        /* Is BPM enabled*/
        if(gMmwMssMCB.cliCfg[subframe].bpmCfg.isEnabled)
        {
            /*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 negative, TX1 positive*/
            bpmChirpCfg.constBpmVal = 0x3U;
            
            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;
            }

            /*configure chirp 2 (++)*/
            memset ((void *)&bpmChirpCfg, 0, sizeof(rlBpmChirpCfg_t));
            bpmChirpCfg.chirpStartIdx = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp2Idx; 
            bpmChirpCfg.chirpEndIdx   = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp2Idx; 
            /* Phase configuration: TX0 positive, TX1 positive*/
            bpmChirpCfg.constBpmVal = 0x0U;
            
            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;
            }

            /*configure chirp 3 (++)*/
            memset ((void *)&bpmChirpCfg, 0, sizeof(rlBpmChirpCfg_t));
            bpmChirpCfg.chirpStartIdx = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp3Idx; 
            bpmChirpCfg.chirpEndIdx   = gMmwMssMCB.cliCfg[subframe].bpmCfg.chirp3Idx; 
            /* Phase configuration: TX0 negative, TX1 positive*/
            bpmChirpCfg.constBpmVal = 0x3U;
            
            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;
            }
        }

Thank you and if anything else comes to mind that I should ensure to change would be appreciated. 

George