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/LAUNCHXL-CC1310: About RFWsn can't apply 433MHz@1mbps for communication

Part Number: LAUNCHXL-CC1310

Tool/software: TI-RTOS

Hi,

I got the RF settings for the 433MHz@1mbps communication through SVS.

8836.7750.smartrf_settings.c
// HACK HACK HACK HACK, this file does not have final settings. It is only as an starting point for a link
//


//*********************************************************************************
// These settings has been generated for use with TI-RTOS and cc13xxware
//
// Generated by SmartRF Studio version 2.2.0
// Tested with TI-RTOS version tirtos_simplelink_2_14_01_17
//
//*********************************************************************************

//*********************************************************************************
// Parameter summary
// Address: aa-bb
// Frequency: 902.00000 MHz
// Data Format: Serial mode disable
// Deviation: Hardcoded by shaping filter
// Packet Length Config: Variable
// Max Packet Length: 125
// Packet Length: 30
// RX Filter BW: Maximum
// Symbol Rate: 1.6 MBaud
// Sync Word Length: Hardcoded by MCE patch
// Whitening: No whitening

#include <ti/devices/DeviceFamily.h>
#include DeviceFamily_constructPath(driverlib/rf_mailbox.h)
#include DeviceFamily_constructPath(driverlib/rf_hs_mailbox.h)
#include DeviceFamily_constructPath(driverlib/rf_common_cmd.h)
#include DeviceFamily_constructPath(driverlib/rf_prop_cmd.h)
#include DeviceFamily_constructPath(driverlib/rf_hs_cmd.h)
#include <ti/drivers/rf/RF.h>
//#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_genfsk.h)
//#include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_genfsk.h)
#include DeviceFamily_constructPath(rf_patches/rf_patch_mce_ghs.h)
#include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_ghs.h)
#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_ghs.h)
#include "smartrf_settings.h"

//#include "radio_par.h" /// OBS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

// TI-RTOS RF Mode Object
RF_Mode RF_prop = {
    .rfMode       =  RF_MODE_PROPRIETARY_SUB_1,
    .cpePatchFxn  =  &enterGhsCpePatch,
    .mcePatchFxn  =  &rf_patch_mce_ghs,
    .rfePatchFxn  =  &rf_patch_rfe_ghs,
};


;

uint32_t pOverrides[] =
{
    MCE_RFE_OVERRIDE(1, 0, 0, 1, 0, 0),  // Patch
    ADI_HALFREG_OVERRIDE(0,61,0xF,0x0), // Maximum AAF bandwidth (same as default)
    HW_REG_OVERRIDE(0x4038,0x0037),             
    HW_REG_OVERRIDE(0x4020,0x7F00),    // Synth
    HW_REG_OVERRIDE(0x4064,0x0040),    // Synth
    (uint32_t)0x000684A3,              // Synth
    (uint32_t)0xC0040141,              // Synth
    (uint32_t)0x0533B107,              // Synth
    (uint32_t)0xA480583,               // Synth
    (uint32_t)0x7AB80603,              // Synth
    ADI_REG_OVERRIDE(1,4,0x9F),        
    ADI_HALFREG_OVERRIDE(1,7,0x4,0x4), 
    (uint32_t)0x00038883,              
    (uint32_t)0x00F988A3,              // RSSI offset (needs to measured)
    (uint32_t)0x02010403,	       // Use default 24mhz clock for synth and set bPhaseDiscard = 1
    (uint32_t)0x00108463,	       // No vairable discard threshold
    (uint32_t)0x04B00243,	       // Increase synth cal timeout to 300us�
    HW32_ARRAY_OVERRIDE(0x405C,1),
    (uint32_t)0x18000280,
    HW_REG_OVERRIDE(0x5104,0x302B),    // Sync threshold
    HW_REG_OVERRIDE(0x6084,0x35F1),    // AGC, Freeze RSSI
    (uint32_t) 0x002C82C3,             // Set "Maximum FIFO threshold to use when going to sleep in Rx" equal to HighSpeed 
    (uint32_t) 0x002882D3,             // Set "FIFO threshold to use when going to sleep in Tx" equal to HighSpeed 
    // ****PA Ramping overrides
    HW_REG_OVERRIDE(0x6088,0x4231),     // Spare 4 register used for PA ramp patch
    HW_REG_OVERRIDE(0x608C,0x0A13),	// Spare 4 register used for PA ramp patch, 8213 for 50kbps
    // ****Length of CW tone
    HW_REG_OVERRIDE(0x52B0,0x00F0),     // Configure the length of CW tone             
    (uint32_t)0xFFFFFFFF,               // End Override

};

// 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, // 1 = GFSK / 0 = FSK
    .modulation.deviation = 400, // Outersymbols, 300 kHz
    .symbolRate.preScale = 0xF,
    .symbolRate.rateWord = 327680, // 500ksps
    .rxBw = 47,                    // ~2MHz
    .preamConf.nPreamBytes = 0x6, 
    .preamConf.preamMode = 0x1,
    .formatConf.nSwBits = 0x20,
    .formatConf.bBitReversal = 0x0,
    .formatConf.bMsbFirst = 0x1,
    .formatConf.fecMode = 9,    // 4-ary
    .formatConf.whitenMode = 0x0,
    .config.frontEndMode = 0x0,
    .config.biasMode = 0x1,
    .config.bNoFsPowerUp = 0x0,
    .txPower = 0x003f, // 12.5 dBm/14 dBm
    .pRegOverride = pOverrides,
    .centerFreq = 433,
    .intFreq = 0x0A66,   // RX: use 0x0A66 (650 kHz)
    //.intFreq = 0x8000,   // TX: Use Automatic 
    .loDivider = 0x0A,
};


// 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 = 433,                   // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .fractFreq = 0x0000,
    .synthConf.bTxMode = 0x0,
    .synthConf.refFreq = 0x0,
    .__dummy0          = 0x00,
    .__dummy1          = 0x00,
    .__dummy2          = 0x00,
    .__dummy3          = 0x0000,

  // Tx command
rfc_CMD_HS_TX_t RF_cmdTxHS =
{
    .commandNo                  = CMD_HS_TX,
    .status                     = 0x0000,
    .pNextOp                    = 0x00000000,
    .startTime                  = 0x00000000,
    .startTrigger.triggerType   = 0x0,
    .startTrigger.bEnaCmd       = 0x0,
    .startTrigger.triggerNo     = 0x0,
    .startTrigger.pastTrig      = 0x0,
    .condition.rule             = 0x1,
    .condition.nSkip            = 0x0,
    .pktConf.bFsOff             = 0x0,
    .pktConf.bUseCrc            = 0x1,
    .pktConf.bVarLen            = 0x1,
    .pQueue                     = 0,
};


  //rx
rfc_CMD_HS_RX_t RF_cmdRxHS =
{
    .commandNo                  = CMD_HS_RX,
    .status                     = 0x0000,
    .pNextOp                    = 0x00000000,
    .startTime                  = 0x00000000,
    .startTrigger.triggerType   = 0x0,
    .startTrigger.bEnaCmd       = 0x0,
    .startTrigger.triggerNo     = 0x0,
    .startTrigger.pastTrig      = 0x0,
    .condition.rule             = 0x1,
    .condition.nSkip            = 0x0,
    .pktConf.bFsOff             = 0x0,
    .pktConf.bUseCrc            = 0x1,
    .pktConf.bVarLen            = 0x1,
    .pktConf.bRepeatOk          = 0x1,
    .pktConf.bRepeatNok         = 0x1,
    .pktConf.addressMode        = 0x0,
    .rxConf.bIncludeLen         = 0x1,
    .rxConf.bIncludeCrc         = 0x1,   // Must increase NUM_APPENDED_BYTES = 5
    .rxConf.bAppendStatus       = 0x0,   // Must increase NUM_APPENDED_BYTES = 5
    .maxPktLen                  = 127,   // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    .endTrigger                 = TRIG_NEVER,
    .endTime                    = 0,
    .pQueue                     = 0,
    .pOutput                    = 0,
};
This setup works fine in the rfpacketTx/Rx and rfEasylinkTx/Rx routines, but not in the RFWsn protocol. Through breakpoint debugging, the program cannot receive after receiving the data once.

 /* Enter receive */
    if(EasyLink_receiveAsync(rxDoneCallback, 0) != EasyLink_Status_Success) {
        System_abort("EasyLink_receiveAsync failed");
    }

    while (1) {
        uint32_t events = Event_pend(radioOperationEventHandle, 0, RADIO_EVENT_ALL, BIOS_WAIT_FOREVER);

        /* If valid packet received */
        if(events & RADIO_EVENT_VALID_PACKET_RECEIVED) {

            /* Send ack packet */
            sendAck(latestRxPacket.header.sourceAddress);

            /* Call packet received callback */
            notifyPacketReceived(&latestRxPacket);

            /* Go back to RX */
            if(EasyLink_receiveAsync(rxDoneCallback, 0) != EasyLink_Status_Success) {
                System_abort("EasyLink_receiveAsync failed");
            }

            /* toggle Activity LED */
            PIN_setOutputValue(ledPinHandle, CONCENTRATOR_ACTIVITY_LED,
                    !PIN_getOutputValue(CONCENTRATOR_ACTIVITY_LED));
        }

After the program runs to if(EasyLink_receiveAsync(rxDoneCallback, 0) != EasyLink_Status_Success) { } in if(events & RADIO_EVENT_VALID_PACKET_RECEIVED), status can return EasyLink_Status_Success. When it continues to step through, it finds that it can not enter rxDoneCallback after executing the program to Event_pend(). 

I don't understand now, EasyLink_receiveAsync can return EasyLink_Status_Success, why the program can't enter rxDoneCallback in event_pend().

  • Hey Mings,

    We will try to reproduce this on our end and see what the issue is.

    BR,
    Seong
  • Hi Seong Kim
    Ok, look forward to your reply, thank you!
  • Hi,

    Do you see this problem only when you are operating using this PHY?

    What is the radio state when it stops responding - status on RF commands for setup, frequency and RX/TX?

    If the radio is switching from RX to TX and back to RX when it stops responding, can you please try re-running the setup command before switching to RX?

    Regards,

  • Hi SVS,

    Thank you very much for your answers. As you suggested, I tried to re-run the setup command before switching to RX and found that the program is working properly.

    Thank you very much for your answers. As you suggested, I tried to re-run the setup command before switching to RX and found that the program is working properly.
    But I don't understand why I need to set it up now? Can you answer me? Thank you.

  • Good to know that it is working.

    There is a bug in the current release of the patch causing this problem with switching between TX and RX. We have fixed this and are testing it internally.

    When the new version of patch is released, there wont be a need to run setup command when switching.

    Regards,

  • Thank you very much for your answer, SVS.

    According to your suggestion, I can finish the normal operation of the program in the concentrator, but the node side has to do the same setting when switching between TX and RX. I actually found that there is a problem on the node side through the actual test, the ACK reception failed, and it is running. After receiving the ACK multiple times, the concentrator can continue to receive data. When will the test on your side have a result? Thank you!

  • Hi,

    Does the code work in any other PHY mode? I do not think that this is a problem related to the 4FSK mode but rather something to do with the timing. My recommendation would be to look at the signals from RF core to verify TX and RX timing with the PHY change in this project.

    Regards,

  • Hi SVS,

    The code works fine and is modified by the RFWSN routine. In addition, I have applied another RF setting before, the program works normally, after the networking, there is an individual node can not connect successfully.

    1586.6866.smartrf_settings.c
    
    //*********************************************************************************
    // These settings has been generated for use with TI-RTOS and cc13xxware
    //
    // Generated by SmartRF Studio version 2.2.0
    // Tested with TI-RTOS version tirtos_simplelink_2_14_02_22
    //
    //*********************************************************************************
    
    
    //*********************************************************************************
    // Parameter summary
    // Frequency: 868.00000 MHz
    // Data Format: Serial mode disable
    // Deviation: 250.000 kHz
    // Packet Length Config: Variable
    // Max Packet Length: 125
    // Packet Length: 30
    // RX Filter BW: 2.8MHz
    // Symbol Rate: 1MBPS
    // Sync Word Length: 32 Bits
    // Whitening: No whitening
    
    #include <driverlib/rf_mailbox.h>
    #include <driverlib/rf_common_cmd.h>
    #include <driverlib/rf_prop_cmd.h>
    #include <ti/drivers/rf/RF.h>
    #include <rf_patches/rf_patch_cpe_genfsk.h>
    
    
    // TI-RTOS RF Mode Object
    RF_Mode RF_prop =
    {
        .rfMode = RF_MODE_PROPRIETARY,
        .cpePatchFxn = &rf_patch_cpe_genfsk,
        .mcePatchFxn = 0,
        .rfePatchFxn = 0,
    };
    
    // Overrides for CMD_PROP_RADIO_DIV_SETUP, 1MBPS mode
    uint32_t pOverrides[] =
    {
    // override_synth.xml
        MCE_RFE_OVERRIDE(0,0,0,0,0,0),   // 1Mbps / BLE PHY selected
        HW_REG_OVERRIDE(0x50c0,0x147A),  // RX-IF must be adjusted due to Divider5
        (uint32_t)0x0343,                // TX-IF = 0
        HW32_ARRAY_OVERRIDE(0x4038,1),
        (uint32_t)0x0000003A,
        HW_REG_OVERRIDE(0x4020,0x7F00),
        HW_REG_OVERRIDE(0x4064,0x0040),
        (uint32_t)0x000684A3,
        (uint32_t)0xC0040141,
        (uint32_t)0x0533B107,
        (uint32_t)0x0A480583,
        (uint32_t)0x7AB80603,
        ADI_REG_OVERRIDE(1,4,0x1F),
        ADI_HALFREG_OVERRIDE(1,7,0x4,0x4),
        (uint32_t)0x00038883,
        //Scaling of the filter in the matched receive filter for BLE
        HW_REG_OVERRIDE(0x50F0,0x0400),         // DEMMAFI0 filter coeffisents for 1 Mbps, 250 kHz deviation
        HW_REG_OVERRIDE(0x50F4,0x7B20),         // DEMMAFI1 filter coeffisents for 1 Mbps, 250 kHz deviation
        HW_REG_OVERRIDE(0x50F8,0x00C1),         // DEMMAFI2 filter coeffisents for 1 Mbps, 250 kHz deviation
        // TX power override
        ADI_REG_OVERRIDE(0,12,0xF9),
        (uint32_t)0xFFFFFFFF,
    };
    
    
    /* 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       = 0x3E8,//250k
        .symbolRate.preScale        = 0xC,
        .symbolRate.rateWord        = 0x80000,//1Mbps
        .rxBw                       = 0x81,//2.8 MHz  1 Mbps/BLE PHY need this for 868 MHz and Divider5
        .preamConf.nPreamBytes      = 0x4,
        .preamConf.preamMode        = 0x0,
        .formatConf.nSwBits         = 0x20,
        .formatConf.bBitReversal    = 0x0,
        .formatConf.bMsbFirst       = 0x1,
        .formatConf.fecMode         = 0x0,
        .formatConf.whitenMode      = 0x1,
        .config.frontEndMode        = 0x0,
        .config.biasMode            = 0x1,
        .config.bNoFsPowerUp        = 0x0,
        .txPower 			= 0xa73f,
        .pRegOverride               = pOverrides,
        .centerFreq                 = 0x0364,
        .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 = 0x0364,
        .fractFreq = 0x0000,
        .synthConf.bTxMode = 0x0,
        .synthConf.refFreq = 0x0,
        .__dummy0 = 0x00,
        .midPrecal = 0x00,
        .ktPrecal = 0x00,
        .tdcPrecal = 0x0000,
    };
    
    // CMD_PROP_TX
    rfc_CMD_PROP_TX_t RF_cmdPropTx =
    {
        .commandNo = 0x3801,
        .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,
        .pktConf.bFsOff = 0x0,
        .pktConf.bUseCrc = 0x1,
        .pktConf.bVarLen = 0x1,
        .pktLen = 0x1e, // SET APPLICATION PAYLOAD LENGTH
        .syncWord = 0x930b51de,
        .pPkt = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };
    
    // CMD_PROP_RX
    rfc_CMD_PROP_RX_t RF_cmdPropRx =
    {
        .commandNo = 0x3802,
        .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,
        .pktConf.bFsOff = 0x0,
        .pktConf.bRepeatOk = 0x0,
        .pktConf.bRepeatNok = 0x0,
        .pktConf.bUseCrc = 0x1,
        .pktConf.bVarLen = 0x1,
        .pktConf.bChkAddress = 0x0,
        .pktConf.endType = 0x0,
        .pktConf.filterOp = 0x0,
        .rxConf.bAutoFlushIgnored = 0x0,
        .rxConf.bAutoFlushCrcErr = 0x0,
        .rxConf.bIncludeHdr = 0x1,
        .rxConf.bIncludeCrc = 0x0,
        .rxConf.bAppendRssi = 0x0,
        .rxConf.bAppendTimestamp = 0x0,
        .rxConf.bAppendStatus = 0x1,
        .syncWord = 0x930b51de,
        .maxPktLen = 0x7d, // MAKE SURE DATA ENTRY IS LARGE ENOUGH
        .address0 = 0xaa,
        .address1 = 0xbb,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .endTime = 0x00000000,
        .pQueue = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
        .pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
    };
    
    // CMD_TX_POWER_BOOST
    rfc_CMD_TX_POWER_BOOST_t RF_cmdTxPowerBoost =
    {
        .commandNo = 0x0816,
        .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 = 0x0,
        .condition.nSkip = 0x0,
        .vddrLevel = 0x00,
        .paTrimValue = 0x00,
    };
    
    // CMD_TX_TEST
    rfc_CMD_TX_TEST_t RF_cmdTxTest =
    {
        .commandNo = 0x0808,
        .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.bUseCw = 0x0,
        .config.bFsOff = 0x0,
        .config.whitenMode = 0x2,
        .__dummy0 = 0x00,
        .txWord = 0xabcd,
        .__dummy1 = 0x00,
        .endTrigger.triggerType = 0x1,
        .endTrigger.bEnaCmd = 0x0,
        .endTrigger.triggerNo = 0x0,
        .endTrigger.pastTrig = 0x0,
        .syncWord = 0x930b51de,
        .endTime = 0x00000000,
    };
    

    The 4FSK mode should be no problem after the previous transceiver test.Regarding the suggestions you mentioned, how should I conduct a specific review? Can you describe it in detail? Thank you

  • Please refer to the following documentation to route signals from RF core to GPIO:

    http://dev.ti.com/tirex/content/simplelink_cc13x2_26x2_sdk_2_40_00_81/docs/proprietary-rf/proprietary-rf-users-guide/rf-core/signal-routing.html

    I am closing this thread since the problem is resolved, please open a new thread if you have further questions.

    Regards,