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.

CC1310: do rssi values retrieved through CMD_GET_RSSI change when the radio is in CMD_RX_TEST mode

Part Number: CC1310

i've commanded the radio to do a non-terminating receive using CMD_RX_TEST....

while that command is executing, i repeatedly call the immediate CMD_GET_RSSI to retrieve an RSSI value....

except for the very first of these calls, i do retrieve what appears to a "reasonable" RSSI value that reflects my environment (where i can control the RF noise)....

what i've noticed, however, is that all subsequent calls show *exactly* the values -- despite the fact that i add/remove jammers mid-stream....

does this initial RSSI value somehow "latch" as part of the CMD_RX_TEST command???

if i want to sample the air for (say) 5 seconds, do i need to issue CMD_RX_TEST repeatedly??? 

thanks, bob.

  • Hello Bob,

    That does not sound right that the RSSI values do not vary with jammers inserted. Can you try increasing the separation from the source. Also make sure it is not using the PCB antenna.

    You can try using the "Continuous Rx" from SmartRF studio, it plots the RSSI values real time. The values that you are seeing from the SmartRF studio should match the values that you see in your project.

    The radio has to be in receive mode for valid RSSI values. If you are sampling for every 5 seconds, you need to turn on the radio every time.


    Regards,
    Prashanth

  • hello prashanth,

    using the same board with "continuous rx" in smartrf studio, i see -101 dB when the environment is quite and -38 db when the environment is being jammed.... these more or less match the values i received through CMD_GET_RSSI....

    and for sure, the values did change in real-time under smartrf studio as i enabled/disabled the jammer....

    as i noted above, my implementation issues CMD_RX_TEST just *once* -- and then calls CMD_GET_RSSI multiple times....

    perhaps smartrf actually enables/disables the radio core as a whole for each sample????

    i could certainly try something like that....

    bob.
  • a sequence that appears to work is: issue CMD_RX_TEST; issue CMD_GET_RSSI repeatedly until value != 0 && value != -128; issue CMD_ABORT to terminate the original CMD_RX_TEST; rinse and repeat....
  • Should not be required. Below I have a code that reads the RSSI every second and output it on UART

    /* Timer Callback */
    static void Timer_CallbackFxn(UArg arg)
    {
        Semaphore_post(txSemaphoreHandle);
    }
    
    /***** Function definitions *****/
    
    void *mainThread(void *arg0)
    {
        uint8_t RSSI_value;
    
        char buffer[12];
    
    
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        const char  startPrompt[] = "Opening UART and RF:\r\n";
    
        Semaphore_construct(&txSemaphore, 0, NULL);
        txSemaphoreHandle = Semaphore_handle(&txSemaphore);
    
        UART_Handle uart;
        UART_Params uartParams;
    
        UART_init();
    
        /* Open LED pins */
        ledPinHandle = PIN_open(&ledPinState, pinTable);
        if (ledPinHandle == NULL)
        {
            while(1);
        }
    
        /* Create a UART with data processing off. */
        UART_Params_init(&uartParams);
        uartParams.writeDataMode = UART_DATA_BINARY;
        uartParams.readDataMode = UART_DATA_BINARY;
        uartParams.readReturnMode = UART_RETURN_FULL;
        uartParams.readEcho = UART_ECHO_OFF;
        uartParams.baudRate = 115200;
    
        uart = UART_open(Board_UART0, &uartParams);
    
        if (uart == NULL) {
                 /* UART_open() failed */
                 while (1);
        }
    
        /* Write to the UART before starting RX */
        UART_write(uart, startPrompt, sizeof(startPrompt));
    
        Util_constructClock(&Clock, Timer_CallbackFxn, 1000, 1000, false, NULL);
        Util_startClock(&Clock);
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, 
                           (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
        /* Enter RX mode and stay forever in RX */
        RF_EventMask terminationReason = RF_postCmd(rfHandle, (RF_Op*)&RF_cmdRxTest,
                                                   RF_PriorityNormal, &callback,
                                                   RF_EventRxEntryDone);
    
        while(1) {
            Semaphore_pend(txSemaphoreHandle, BIOS_WAIT_FOREVER);
            RSSI_value = RF_getRssi(rfHandle);
            sprintf(buffer, "RSSI = %d\r\n", RSSI_value);
            UART_write(uart,buffer , sizeof(buffer));
        }
    }
    
    void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
    {
    
    }