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.

RTOS/CC1310: CC1310 gets always the same RSSI value until reset

Part Number: CC1310

Tool/software: TI-RTOS

Hi,

I'm trying to get RSSI values for Spectrum Sensing application. I have started the same application using Launchpad and continue on our custom board. The problem is the same with Launchpad (tested with SmartRfStudio) andour custom board with TI-RTOS.

Create the problem with these steps:

1- On lauchpad, start smartrfstudio and setup for Continoues RX

2- Start testing for RSSI values, most of the time RSSI will fixed to value and it will not corrected until reset the board.

What is the reason for that?

Best Regards

  • Are you saying SmartRF Studio is showing you the same RSSI values? Or are you saying that after closing SmartRF Studio and executing your own code, your code shows the same RSSI values?

    Can you provide the code you are using to retrieve RSSI?

    Are you using rxConf.bAppendRssi = 1; and you are pulling RSSI from packets? Or are you just poling the receiver for the current RSSI?
  • In addition: Are you in RSSI saturation when you do the measurements? (High RSSI value). Some plots would be helpful.
  • Hi,

    we have tried both, the lauchpad with smartrfstdio (the picture) and custom board with TI-RTOs code (attached also).

    void SniffRssi(uint32_t duration)
    {
        int8_t rssi = (int8_t) RF_GET_RSSI_ERROR_VAL;
        System_printf("%s %d-->SniffRssi is working started\n\r", __FILE__, __LINE__);
        RF_cmdRxTest.startTrigger.triggerType = TRIG_NOW;
        RF_cmdRxTest.startTime = 0;
        RF_cmdRxTest.endTrigger.triggerType = TRIG_REL_START;
        RF_cmdRxTest.endTime = duration;
    
        if (rfCmdHandle != -1)
        {
            RF_cancelCmd(rfHandle, rfCmdHandle, 1);
        }
        uint16_t centerFreq, fractFreq;
        calculateFreq(DEFAULT_RADIO_FREQ, &centerFreq, &fractFreq);
        setRadioFreq(centerFreq, fractFreq);
        rfCmdHandle = RF_postCmd(rfHandle, (RF_Op*) &RF_cmdRxTest, RF_PriorityNormal, RXTest_callback, 0);
        int c = 0;
        while (((rssi == RF_GET_RSSI_ERROR_VAL) || (rssi == 0)) && c < 10)
        {
            c++;
            rssi = RF_getRssi(rfHandle);
            Task_sleep(MSECOND);
        }
        System_printf("%s %d-->SniffRssi is working started\n\r", __FILE__, __LINE__);
        int i;
        int num_of_packets = 0;
        int accumulator = 0;
        int mean = 0;
        int samples =( duration / (1 * 4000) -c);
        for (i = 0; i < samples; i++)
        {
            rssi = RF_getRssi(rfHandle);
            System_printf("%s %d-->SniffRssi is working rssi %d\n\r", __FILE__, __LINE__, rssi);
            accumulator += rssi;
            if (rssi > RSSI_THRESHOLD_DBM)
            {
                num_of_packets++;
            }
            Task_sleep(MSECOND);
        }
        mean = accumulator / samples;
        System_printf("i: %d\n", i);
        System_printf("Number of samples: %d\n", samples);
        System_printf("Accumulator: %d\n", accumulator);
        System_printf("Mean: %d\n", mean);
        //Task_sleep(50 * (1000 / Clock_tickPeriod));
    }

    Actually, we are trying to make something like Spectrum analyzer for specisific bands. Therefore we are not seeking packages, but we are looking only the noise level in the air. we are poling the receiver for the current RSSI. I thing the receiver is not in saturation either. (see the figure, the RSS is about  -60dBm)

    Best Regards

  • check your smartrf_settings file.  Is your reader falling out of RX?

    Have a look at these settings. This is what I used for my monitor, and it loops just find. very simmilar code.

    RF Settings:

    // CMD_PROP_RADIO_DIV_SETUP
    rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup =
    {
        .commandNo = 0x3807,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .modulation.modType = 0x1,
        .modulation.deviation = 0x1F0,
        .symbolRate.preScale = 0x7,
        .symbolRate.rateWord = 0x9423,
        .rxBw = 0x28,
        .preamConf.nPreamBytes = 0x4,
        .preamConf.preamMode = 0x0,
        .formatConf.nSwBits = 0x20,
        .formatConf.bBitReversal = 0x0,
        .formatConf.bMsbFirst = 0x1,
        .formatConf.fecMode = 0x0,
        .formatConf.whitenMode = 0x0,
        .config.frontEndMode = 0x0,
        .config.biasMode = 0x1,
        .config.analogCfgMode = 0x0,
        .config.bNoFsPowerUp = 0x0,
        .txPower = 0x12C3,
        .pRegOverride = pOverrides,
        .centerFreq = 0x039E,
        .intFreq = 0x8000,
        .loDivider = 0x05,
    };
    
    // CMD_FS
    rfc_CMD_FS_t RF_cmdFs =
    {
        .commandNo = 0x0803,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .frequency = 0x039E,
        .fractFreq = 0x8000,
        .synthConf.bTxMode = 0x0,
        .synthConf.refFreq = 0x0,
        .__dummy0 = 0x00,
        .__dummy1 = 0x00,
        .__dummy2 = 0x00,
        .__dummy3 = 0x0000,
    };
    
    // CMD_RX_TEST
    rfc_CMD_RX_TEST_t RF_cmdRxTest =
    {
        .commandNo = 0x0807,
        .status = 0x0000,
        .pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
        .startTime = 0x00000000,
        .startTrigger.triggerType = 0x0,
        .startTrigger.bEnaCmd = 0x0,
        .startTrigger.triggerNo = 0x0,
        .startTrigger.pastTrig = 0x0,
        .condition.rule = 0x1,
        .condition.nSkip = 0x0,
        .config.bEnaFifo = 0x0,
        .config.bFsOff = 0x0,
        .config.bNoSync = 0x1,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .syncWord = 0x930B51DE,
        .endTime = 0x00000000,
    };

    output RSSI over UART:

        RF_Params rfParams;
        RF_Params_init(&rfParams);
        /* 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_postCmd(rfHandle, (RF_Op*)&RF_cmdRxTest, RF_PriorityNormal, NULL, 0);
    
        UART_Handle uart;
        UART_Params uartParams;
        //const char echoPrompt[] = "\fRSSI Values:\r\n";
    
        /* 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 = 9600;
        uart = UART_open(Board_UART0, &uartParams);
    
        if (uart == NULL) {
            System_abort("Error opening the UART");
        }
    
        //UART_write(uart, echoPrompt, sizeof(echoPrompt));
        int RSSI = 0;
        /* Loop forever echoing */
        while (1) {
    
        	if(buttonPress)
        	{
        		RSSI = (int)RF_getRssi(rfHandle);
    
        		//int aInt = 368;
        		char str[12];
        		sprintf(str, "RSSI: %d\r\n", RSSI);
    
            	//UART_read(uart, &input, 1);
            	UART_write(uart, &str, 12);
        	}
        }

  • If you want to make a spectrum analyzer, why start from the LRM settings? Do you get the same if you use the 50 kbps setting?
  • Hi,

    our main application is using LRM settings, therefore we go on with these settings. If it will change the RSSI capture timing, we can use 50 or even other high rate settings, because of battery life time.

    I will try and write down the results in couple of days.

    Best Regards

  • I haven't been into the office this week so I haven't been able to do some simple tests. Have you had any progress?
  • Hi TER,

    we made some tests with different settings in the RSSI catcher side. We got different results with different settings, keeping the noise generating part the same all the time. The problem is continue also. Do you have any suggestions?

    Best Regards

  • Are you testing on Rev A or rev B of CC1310?
  • Hi,

    it is rev B

  • I did a very simple test with a CC1310 LP using a rev B chip. I selected the 5 kbps long range mode and the cont. RX tab. I then turned on a sender and move that around a bit. I get a RSSI that varies from about -120 dBm (TX off) to about -20 dBm dependent if I use an antenna on both LPs or not and the distance is varied.

    Do you see the same or do you still get the fixed at one value?