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.

AWR2243: Frame Trigger Select

Part Number: AWR2243

Hello,

we design our own board with 4 AWR2243 (ES1.0) chips in cascade. We use device firmware package "mmwave_dfp_02_02_00_03".

In our first version we use the software trigger mode on master device to trigger a new frame. The slave will be triggered per hardware trigger. This is the method like it works on the EVM evalution board. This works fine. We trigger a new frame, when we finished the processing of the previous frame. So we have a dynamic frame period.

The disadvantage is, that we send each frame a "rlSensorStart" to all devices which need around 15ms.

1. Is this plausible that the "rlSensorStart" needs about 15ms for execution?

On our custom board we can also trigger the master device per hardware. So what i want to do:

1. Config all devices to "hardware trigger" and set numFrames=1

	frameCfgArgs.numFrames = 1; /* one frame per trigger */
	frameCfgArgs.triggerSelect = 2; /* hardware trigger */

	retVal = rlSetFrameConfig(MASTER_DEVICE,&frameCfgArgs);
	if (retVal != RL_RET_CODE_OK){
		return retVal;
	}

	frameCfgArgs.triggerSelect = 2;	/* hardware trigger */
	retVal = rlSetFrameConfig(SLAVE_DEVICES,&frameCfgArgs);
	if (retVal != RL_RET_CODE_OK){
		return retVal;
	}

2. Call rlSensorStart once

	retVal = rlSensorStart(SLAVE_DEVICES);
	if(retVal != RL_RET_CODE_OK){
		xil_printf("ERROR: rlSensorStart\n");
	}
	retVal = rlSensorStart(MASTER_DEVICE);
	if(retVal != RL_RET_CODE_OK){
		xil_printf("ERROR: rlSensorStart\n");
	}

3. Trigger Frame with rising edge of SYNC_IN on all devices.

But unfortunally it does not work. What we see, that we always call "rlSensorStart" before we trigger a frame per hardware. Is this correct?

Regards,

Phil

  • Hi Phil,

    The Hardware triggering is done by rising edge of pulse in SYNC_IN pin after receiving AWR_FRAMESTARTSTOP_CONF_SB. So, you will need to issue this API. 

    For your setup, is the Sensor Start API taking 15ms on a single chip?  The execution time should not be this high. Are you using any OS or is any other interrupts is preventing the code flow for Sensor start ?

    Thanks,

    Pradipta.

  • Hello and thanks for reply.

    The Sensor Start API takes about 15ms for all 4 devices. When i analyse the SPI and interrupt lines, i see that each command needs about 3-4ms.

    I use no OS in my setup and call it from baremetall. So i have no relevant delay on my side.

    In my current solution i trigger each frame per hardware trigger. The sensor start command will be triggered during processing. So i do not lose time.

    A good solution would be to send the sensor start command once at startup and start each frame with a hardware trigger.

    Regards,

    Phill

  • Hi Phil,

    Can you let us know how you are measuring the 15 ms ? I tried the time capture for sensor start API (time difference between the start and end of this API) using software trigger and we observed a timing of 320 us so the hardware trigger should be a similar or litter faster than this timing. So, are you measuring the time after issuing the command and then waiting till the RF signal? 

    Thanks,

    Pradipta.

  • Hello,

    i am only measure the duration of the api commands.

    Below you can find the code. Over this function i measured 15ms.

    int32_t AWR2243::startMeasurement(void){
        rlReturnVal_t retVal;
        int timeOutCnt = 0;
        mmwl_bSensorStarted = 0;

        retVal = rlSensorStart(SLAVE_DEVICES);
        if(retVal != RL_RET_CODE_OK){
            xil_printf("ERROR: rlSensorStart\n");
        }
        while (((mmwl_bSensorStarted & SLAVE_DEVICES) != SLAVE_DEVICES) )
        {
            rlNonOsMainLoopTask();
            usleep(100);
            timeOutCnt++;
            if (timeOutCnt > MMWL_API_INIT_TIMEOUT)
            {
                xil_printf("ERROR: timeout no async message from device %d received\n",SLAVE_DEVICES);
                return RL_RET_CODE_RESP_TIMEOUT;
            }
        }
        retVal = rlSensorStart(MASTER_DEVICE);
        if(retVal != RL_RET_CODE_OK){
            xil_printf("ERROR: rlSensorStart\n");
        }
        while (((mmwl_bSensorStarted & MASTER_DEVICE) != MASTER_DEVICE) )
        {
            rlNonOsMainLoopTask();
            usleep(100);
            timeOutCnt++;
            if (timeOutCnt > MMWL_API_INIT_TIMEOUT)
            {
                xil_printf("ERROR: timeout no async message from device %d received\n",MASTER_DEVICE);
                return RL_RET_CODE_RESP_TIMEOUT;
            }
        }

        return retVal;
    }

  • Hi Phil,

    For timing we were referring to the time taken the rlSensorStart API to execute the code written in it. That will take 320 us in software trigger mode.

    Your code is actually trying to measure the time difference between when the sensor has started, and the device will start sending out chirps and until the async event is received. This timing will depend on the parameters you are using for programming your chirps and frame like the active chirp time, idle chirp time, idle frame time, number of frames etc. SO, if you want to reduce this timing you will need to change the above parameters. You can also cross check this at your end as well by adding these timings and you should see similar timing in your calculations as well.

    Thanks,

    Pradipta.