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.

CCS/CC1310: CC1310 : OOK mode at 20kbps received not ok.

Part Number: CC1310


Tool/software: Code Composer Studio

Hi.

I have two Launchxl-CC1310 boards.One is used to packet TX on SmartRF Studio 7, and another packet RX.

Set parameters to RF:868MHz,symbol rate:20kHz,BW:78kHz.

But,there are didn't work,and decrease symbol rate to 4.8k(default settings) can work.

According to the following post: e2e.ti.com/support/wireless-connectivity/sub-1-ghz/f/156/t/576254#pi320995filter=all&pi320995scroll=false ,I set 0x6098 to 0x1200 and set 0x52B8 to 8015.There work,but receive many error bits. 

how to improve accuracy,insure communication quality.

Thanks.

  • Why did you increase the BW? I tested the 4.8 kbps OOK settings in SmartRF Studio and only changed the data rate to 20 kbps. I received all packets without CRC errors, even without modifying any of the overrides.

    Siri
  • Thank you for you reply ,Siri.

    If I only change the data rate to 20kbps,receiver very hard to accept data even if the spectrometer can grabs the output signal from the transmitter.
    Will it have anything to do with hardware,and the version of my evaluation board is 1.4 ?

    I've tried Several BW,78KHz is just one of them,but all failed.
  • I assume it is the Launchpads you are referring to. Rev. 1.4 is fine.
    It is kind of hard for me to help you as I do not get any problems on my side. I have tested several boards and they are OK.

    What you can do is to check the frequency of your two boards to make sure that there is not a big frequency difference between them.

    You can also play around with the overrides described in the post you were referring to.

    To check that your duty cycle is OK you can output the transmitted data to a pin doing the following:

    Change the MCE_RFE override to:

    MCE_RFE_OVERRIDE(1,0,2,1,0,0)

    To output the signal to IOID_1:

    PIN_Config pinTable[] =
    {
    IOID_1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    PIN_TERMINATE
    };
    .
    .
    PINCC26XX_setMux(pinHandle, IOID_1, PINCC26XX_MUX_RFC_SMI_CL_OUT);

    BR
    Siri
  • Thank you,Siri.

    According to what you said,I added the corresponding code to rePacketTx routine. But I didn't see any waveforms on DIO_1 even if Tried many times.

    I just changed rfpacket.c,the changed file is shown in the attachment.Can you help me  find out where the mistake is.

    /*
     * Copyright (c) 2017, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /***** Includes *****/
    /* Standard C Libraries */
    #include <stdlib.h>
    #include <unistd.h>
    
    /* TI Drivers */
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/pin/PINCC26XX.h>
    
    /* Driverlib Header files */
    #include DeviceFamily_constructPath(driverlib/rf_prop_mailbox.h)
    
    /* Board Header files */
    #include "Board.h"
    #include "smartrf_settings/smartrf_settings.h"
    
    /***** Defines *****/
    
    /* Do power measurement */
    //#define POWER_MEASUREMENT
    #define test
    
    /* Packet TX Configuration */
    #define PAYLOAD_LENGTH      30
    #ifdef POWER_MEASUREMENT
    #define PACKET_INTERVAL     5  /* For power measurement set packet interval to 5s */
    #else
    #define PACKET_INTERVAL     500000  /* Set packet interval to 500000us or 500ms */
    #endif
    
    /***** Prototypes *****/
    
    /***** Variable declarations *****/
    static RF_Object rfObject;
    static RF_Handle rfHandle;
    
    /* Pin driver handle */
    static PIN_Handle ledPinHandle;
    static PIN_State ledPinState;
    
    
    static uint8_t packet[PAYLOAD_LENGTH];
    static uint16_t seqNumber;
    
    /*
     * Application LED pin configuration table:
     *   - All LEDs board LEDs are off.
     */
    PIN_Config pinTable[] =
    {
        Board_PIN_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    #ifdef POWER_MEASUREMENT
    #if defined(Board_CC1350_LAUNCHXL)
        Board_DIO30_SWPWR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    #endif
    #endif
        IOID_1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
        PIN_TERMINATE
    };
    
    /***** Function definitions *****/
    
    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
    
        /* Open LED pins */
        ledPinHandle = PIN_open(&ledPinState, pinTable);
        if (ledPinHandle == NULL)
        {
            while(1);
        }
    
    #ifdef POWER_MEASUREMENT
    #if defined(Board_CC1350_LAUNCHXL)
        /* Route out PA active pin to Board_DIO30_SWPWR */
        PINCC26XX_setMux(ledPinHandle, Board_DIO30_SWPWR, PINCC26XX_MUX_RFC_GPO1);
    #endif
    #endif
    
    #ifdef test
        pOverrides[0]=MCE_RFE_OVERRIDE(1,0,2,1,0,0);
        PINCC26XX_setMux(ledPinHandle, IOID_1, PINCC26XX_MUX_RFC_SMI_DL_OUT);
    #endif
    
        RF_cmdPropTx.pktLen = PAYLOAD_LENGTH;
        RF_cmdPropTx.pPkt = packet;
        RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
    
        /* 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);
    
        while(1)
        {
            /* Create packet with incrementing sequence number and random payload */
            packet[0] = (uint8_t)(seqNumber >> 8);
            packet[1] = (uint8_t)(seqNumber++);
            uint8_t i;
            for (i = 2; i < PAYLOAD_LENGTH; i++)
            {
                packet[i] = 0x55;
            }
    
            /* Send packet */
            RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx,
                                                       RF_PriorityNormal, NULL, 0);
    
            switch(terminationReason)
            {
                case RF_EventLastCmdDone:
                    // A stand-alone radio operation command or the last radio
                    // operation command in a chain finished.
                    break;
                case RF_EventCmdCancelled:
                    // Command cancelled before it was started; it can be caused
                // by RF_cancelCmd() or RF_flushCmd().
                    break;
                case RF_EventCmdAborted:
                    // Abrupt command termination caused by RF_cancelCmd() or
                    // RF_flushCmd().
                    break;
                case RF_EventCmdStopped:
                    // Graceful command termination caused by RF_cancelCmd() or
                    // RF_flushCmd().
                    break;
                default:
                    // Uncaught error event
                    while(1);
            }
    
            uint32_t cmdStatus = ((volatile RF_Op*)&RF_cmdPropTx)->status;
            switch(cmdStatus)
            {
                case PROP_DONE_OK:
                    // Packet transmitted successfully
                    break;
                case PROP_DONE_STOPPED:
                    // received CMD_STOP while transmitting packet and finished
                    // transmitting packet
                    break;
                case PROP_DONE_ABORT:
                    // Received CMD_ABORT while transmitting packet
                    break;
                case PROP_ERROR_PAR:
                    // Observed illegal parameter
                    break;
                case PROP_ERROR_NO_SETUP:
                    // Command sent without setting up the radio in a supported
                    // mode using CMD_PROP_RADIO_SETUP or CMD_RADIO_SETUP
                    break;
                case PROP_ERROR_NO_FS:
                    // Command sent without the synthesizer being programmed
                    break;
                case PROP_ERROR_TXUNF:
                    // TX underflow observed during operation
                    break;
                default:
                    // Uncaught error event - these could come from the
                    // pool of states defined in rf_mailbox.h
                    while(1);
            }
    
    #ifndef POWER_MEASUREMENT
            PIN_setOutputValue(ledPinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
    #endif        
            /* Power down the radio */
            RF_yield(rfHandle);
    
    #ifdef POWER_MEASUREMENT
            /* Sleep for PACKET_INTERVAL s */
            sleep(PACKET_INTERVAL);
    #else
            /* Sleep for PACKET_INTERVAL us */
            usleep(PACKET_INTERVAL);
    #endif
    
        }
    }

    Besides, What does  PINCC26XX_MUX_RFC_SMI_CL_OUT signal mean.I think if I set symbolrate to 20kHz,this signal is a waveform with a period of 20 kHz,right?

  • The signal will show the received data on the RX side. If you transmit a preamble on the TX side (you can use SmartRF Studio in Cont. TX mode to accomplish this), you should see that preamble on the DIO_1 pin on the receiver.

    I was wrong in my last post telling you that everything worked OK on my side. I was using the 4.8 kbps GFSK test case and not the OOK case. I am sorry for that.

    When testing OOK I see the same thing as you do. With the overrides from the other post, I get some sync detects, but all packets have errors.
    I talked to the modem designers who implemented OOK mode, and they were not even sure that we should be able to support up to 20 kbps in OOK mode (we have only characterized 4.8). I have not been able to get in contact with the engineer that gave the overrides for 20 kbps, to ask if he had tested this with good performance.

    If you monitor the received preamble you will see that the duty cycle is not 50 % and there will also be variation in the period of the signal. I can only recommend that you do some more testing where you step up and down the
    0x52B8 override around 8015 for different values of the 0x6098 override (only change the 3 MSB).

    Please share your results if you are able to get it to work.

    BR

    Siri
  • I will try to do some tests  according to what you said.

    Please tell me the result as soon as possible,When you contact  the engineer.

    Thank you again,Siri.

  • I will keep you updated. The engineer who did the testing is out of the office until next week, so I will not be able to get back to you before that. Good luck with your testing :-)

    Siri
  • Hi

    I have checked with the engineer who suggested the overrides, and unfortunately he had only looked at the TX side, verifying that the duty cycle etc. looked OK. He had not set up link, but we have tried that today without any luck. Unfortunately we do not have the resources to spend much more time on this.

    BR

    Siri
  • Thank you very much for your help,Siri.

    I also made some attempts in the past two days, but none of them succeeded.So I will use FSK mode to communicate.