Tool/software: Code Composer Studio
Hi, I want to change the frequency of Wake On Radio function. I modified the Wake On Radio example in sdk 3.20.00.23
I replaced the smartrf_settings.c and smartrf_settings.h files in the project with those exported from smartrf studio 7
smartrf_settings.c
//********************************************************************************* // Generated by SmartRF Studio version 2.11.0 (build#126) // The applied template is compatible with CC13x0 SDK 1.60.xx.xx // Device: CC1310 Rev. 2.1 (Rev. B) // //********************************************************************************* //********************************************************************************* // Parameter summary // Address: 0 // Address0: 0xAA // Address1: 0xBB // Frequency: 915.00000 MHz // Data Format: Serial mode disable // Deviation: 195.000 kHz // pktLen: 30 // 802.15.4g Mode: 0 // Select bit order to transmit PSDU octets:: 1 // Packet Length Config: Variable // Max Packet Length: 255 // Packet Length: 64 // Packet Data: 255 // RX Filter BW: 622 kHz // Symbol Rate: 480.00031 kBaud // Sync Word Length: 32 Bits // TX Power: 12.5 dBm (requires define CCFG_FORCE_VDDR_HH = 0 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual) // Whitening: CC1101/CC2500 compatible #include <ti/devices/DeviceFamily.h> #include DeviceFamily_constructPath(driverlib/rf_mailbox.h) #include DeviceFamily_constructPath(driverlib/rf_common_cmd.h) #include DeviceFamily_constructPath(driverlib/rf_prop_cmd.h) #include <ti/drivers/rf/RF.h> #include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_wb_dsss.h) #include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_wb_dsss.h) #include DeviceFamily_constructPath(rf_patches/rf_patch_mce_wb_dsss.h) #include "smartrf_settings.h" // TI-RTOS RF Mode Object RF_Mode RF_prop = { .rfMode = RF_MODE_PROPRIETARY_SUB_1, .cpePatchFxn = &rf_patch_cpe_wb_dsss, .mcePatchFxn = &rf_patch_mce_wb_dsss, .rfePatchFxn = &rf_patch_rfe_wb_dsss, }; // Overrides for CMD_PROP_RADIO_DIV_SETUP uint32_t pOverrides[] = { // override_use_patch_wb_dsss.xml // PHY: Use MCE RAM patch, RFE RAM patch MCE_RFE_OVERRIDE(1,0,0,1,0,0), // override_synth_prop_863_930_div5.xml // Synth: Set recommended RTRIM to 7 HW_REG_OVERRIDE(0x4038,0x0037), // Synth: Set Fref to 4 MHz (uint32_t)0x000684A3, // Synth: Configure fine calibration setting HW_REG_OVERRIDE(0x4020,0x7F00), // Synth: Configure fine calibration setting HW_REG_OVERRIDE(0x4064,0x0040), // Synth: Configure fine calibration setting (uint32_t)0xB1070503, // Synth: Configure fine calibration setting (uint32_t)0x05330523, // Synth: Set loop bandwidth after lock to 20 kHz (uint32_t)0x0A480583, // Synth: Set loop bandwidth after lock to 20 kHz (uint32_t)0x7AB80603, // Synth: Configure VCO LDO (in ADI1, set VCOLDOCFG=0x9F to use voltage input reference) ADI_REG_OVERRIDE(1,4,0x9F), // Synth: Configure synth LDO (in ADI1, set SLDOCTL0.COMP_CAP=1) ADI_HALFREG_OVERRIDE(1,7,0x4,0x4), // Synth: Use 24 MHz XOSC as synth clock, enable extra PLL filtering (uint32_t)0x02010403, // Synth: Configure extra PLL filtering (uint32_t)0x00108463, // Synth: Increase synth programming timeout (0x04B0 RAT ticks = 300 us) (uint32_t)0x04B00243, // override_synth_disable_bias_div5.xml // Synth: Set divider bias to disabled HW32_ARRAY_OVERRIDE(0x405C,1), // Synth: Set divider bias to disabled (specific for loDivider=5) (uint32_t)0x18000200, // override_phy_gfsk_rx.xml // Rx: Set LNA bias current trim offset to 3 (uint32_t)0x00038883, // Rx: Freeze RSSI on sync found event HW_REG_OVERRIDE(0x6084,0x35F1), // override_phy_wb_dsss_spreading_1.xml // Set correlation threshold to 0x48 HW_REG_OVERRIDE(0x5108,0x0048), // Enable PA ramping of 5 us and AGC reference level of 0x1E HW_REG_OVERRIDE(0x6088,0x1F1E), // Set spreading = 1, K = 4 HW_REG_OVERRIDE(0x52AC,0x0800), // Tx: Configure PA ramping setting (0x08) for approximately 5 us PA ramp time HW_REG_OVERRIDE(0x608C,0x3F13), // TX: set intFreq = 0 (uint32_t)0x00000343, // override_phy_rx_rssi_offset_5db.xml // Rx: Set RSSI offset to adjust reported RSSI by +5 dB (default: 0), trimmed for external bias and differential configuration (uint32_t)0x00FB88A3, (uint32_t)0xFFFFFFFF }; // CMD_PROP_RADIO_DIV_SETUP // Proprietary Mode Radio Setup Command for All Frequency Bands 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 = 0x30C, .symbolRate.preScale = 0xF, .symbolRate.rateWord = 0x4CCCD, .symbolRate.decimMode = 0x0, .rxBw = 0x2C, .preamConf.nPreamBytes = 0x5, .preamConf.preamMode = 0x1, .formatConf.nSwBits = 0x20, .formatConf.bBitReversal = 0x0, .formatConf.bMsbFirst = 0x0, .formatConf.fecMode = 0x8, .formatConf.whitenMode = 0x1, .config.frontEndMode = 0x0, .config.biasMode = 0x1, .config.analogCfgMode = 0x0, .config.bNoFsPowerUp = 0x0, .txPower = 0xA63F, .pRegOverride = pOverrides, .centerFreq = 0x0393, .intFreq = 0x0B33, .loDivider = 0x05 }; // CMD_FS // Frequency Synthesizer Programming Command 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 = 0x0393, .fractFreq = 0x0000, .synthConf.bTxMode = 0x0, .synthConf.refFreq = 0x0, .__dummy0 = 0x00, .__dummy1 = 0x00, .__dummy2 = 0x00, .__dummy3 = 0x0000 }; // CMD_PROP_TX // Proprietary Mode Transmit Command 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 = 0x40, .syncWord = 0x00000000, .pPkt = 0 // INSERT APPLICABLE POINTER: (uint8_t*)&xxx }; // CMD_PROP_RX // Proprietary Mode Receive Command 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 = 0x00000000, .maxPktLen = 0xFF, .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 };
smartrf_settings.h
#ifndef _SMARTRF_SETTINGS_H_ #define _SMARTRF_SETTINGS_H_ //********************************************************************************* // Generated by SmartRF Studio version 2.11.0 (build#126) // The applied template is compatible with CC13x0 SDK 1.60.xx.xx // Device: CC1310 Rev. 2.1 (Rev. B) // //********************************************************************************* #include <ti/devices/DeviceFamily.h> #include DeviceFamily_constructPath(driverlib/rf_mailbox.h) #include DeviceFamily_constructPath(driverlib/rf_common_cmd.h) #include DeviceFamily_constructPath(driverlib/rf_prop_cmd.h) #include <ti/drivers/rf/RF.h> // TI-RTOS RF Mode Object extern RF_Mode RF_prop; // RF Core API commands extern rfc_CMD_PROP_RADIO_DIV_SETUP_t RF_cmdPropRadioDivSetup; extern rfc_CMD_FS_t RF_cmdFs; extern rfc_CMD_PROP_TX_t RF_cmdPropTx; extern rfc_CMD_PROP_RX_t RF_cmdPropRx; // RF Core API Overrides extern uint32_t pOverrides[]; #endif // _SMARTRF_SETTINGS_H_
and I have changed this in rfWakeOnRadioRX.c :
#define WOR_RF_PHY_DATARATE WOR_RF_PHY_DATARATE_500KBPS
I have change it to 500KBPS since the rate is 480KBPS
However, the launchpad running RX could not receive anything from the TX launchpad. I have another launchpad act as a sniffer, and with the same settings shown in the smartrf_settings.c, the sniffer are able to show the packets sent correctly. (so i assume the TX part has no problem...)
Is there anything else that I need to set/ change in the project?
Thanks