Part Number:CC1310
我需要根据不同的空速修改不同的模式,如下图所示,例如我625空速使用的legacy long range模式,当我切换到5k空速时,我希望使用simplilink long range。
根据各空速生成的smartrf_settings.c文件进行文件对比,我将其中的不同参数已经了修改,但是发现修改后仍然无法通信,我需要知道生成的smartrf_settings.c里面的参数在我主函数哪一步之前调用的,以及如何才能进行参数修改以及切换。下图是修改的部分参数截图,以及在RF初始化之前进行的修改语句。
使用搜索功能,看不到smartrf_setting.c的参数赋值的位置。
Nick Sun:
您好,
感谢您的对TI产品的关注!为更加有效地解决您的问题,我需要多一些时间查看这款芯片,稍后会为您解答。
,
Nick Sun:
您好,
我不确定我是否理解您的问题和您给出的显示的数字。
如果您想要同时使用传统 lrm (625 bps) 和 SimpleLink lrm (5 kbps),您需要在 smartrf_settings 文件中包含这两种模式的所有设置、覆盖、补丁:
//********************************************************************************* // Parameter summary // RX Address0: 0xAA// RX Address1: 0xBB// RX Address Mode: No address check// Frequency: 868.00000 MHz // Data Format: Serial mode disable// Deviation: 5.000 kHz // Packet Length Config: Variable// Max Packet Length: 255// Packet Length: 20// Packet Data: 255// RX Filter BW: 39 kHz // Symbol Rate: 10.00061 kBaud // Sync Word Length: 32 Bits// TX Power: 14 dBm (requires define CCFG_FORCE_VDDR_HH = 1 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual) // Whitening: No whitening#include "smartrf_settings.h"#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_lrm.h) #include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_lrm.h)// TI-RTOS RF Mode Object RF_Mode RF_prop = {.rfMode = RF_MODE_PROPRIETARY_SUB_1,.cpePatchFxn = &rf_patch_cpe_lrm,.mcePatchFxn = 0,.rfePatchFxn = &rf_patch_rfe_lrm };// Overrides for CMD_PROP_RADIO_DIV_SETUP uint32_t pOverrides_625[] = {// override_use_patch_prop_lrm.xml// PHY: Use MCE ROM bank 3, RFE RAM patchMCE_RFE_OVERRIDE(0,3,0,1,0,0),// override_synth_prop_863_930_div5.xml// Synth: Set recommended RTRIM to 7...(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_625 = {.commandNo = 0x3807,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx.startTime = 0x00000000,....pRegOverride = pOverrides_625,.centerFreq = 0x0364,.intFreq = 0x8000,.loDivider = 0x05 };// CMD_FS // Frequency Synthesizer Programming Command rfc_CMD_FS_t RF_cmdFs_625 = {.commandNo = 0x0803,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx.. };// CMD_PROP_TX // Proprietary Mode Transmit Command rfc_CMD_PROP_TX_t RF_cmdPropTx_625 = {.commandNo = 0x3801,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx... };// CMD_PROP_RX // Proprietary Mode Receive Command rfc_CMD_PROP_RX_t RF_cmdPropRx_625 = {.commandNo = 0x3802,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx.startTime = 0x00000000,... };//********************************************************************************* // Parameter summary // RX Address0: 0xAA// RX Address1: 0xBB// RX Address Mode: No address check// Frequency: 868.00000 MHz // Data Format: Serial mode disable// Deviation: 5.000 kHz // Packet Length Config: Variable// Max Packet Length: 255// Packet Length: 20// Packet Data: 255// RX Filter BW: 49 kHz // Symbol Rate: 19.99969 kBaud // Sync Word Length: 32 Bits// TX Power: 14 dBm (requires define CCFG_FORCE_VDDR_HH = 1 in ccfg.c, see CC13xx/CC26xx Technical Reference Manual) // Whitening: CC1101/CC2500 compatible#include "smartrf_settings.h"#include DeviceFamily_constructPath(rf_patches/rf_patch_cpe_sl_longrange.h) #include DeviceFamily_constructPath(rf_patches/rf_patch_rfe_sl_longrange.h) #include DeviceFamily_constructPath(rf_patches/rf_patch_mce_sl_longrange.h)// TI-RTOS RF Mode Object RF_Mode RF_prop = {.rfMode = RF_MODE_PROPRIETARY_SUB_1,.cpePatchFxn = &rf_patch_cpe_sl_longrange,.mcePatchFxn = &rf_patch_mce_sl_longrange,.rfePatchFxn = &rf_patch_rfe_sl_longrange };// Overrides for CMD_PROP_RADIO_DIV_SETUP uint32_t pOverrides_5k[] = {// override_use_patch_simplelink_long_range.xml// PHY: Use MCE RAM patch, RFE RAM patchMCE_RFE_OVERRIDE(1,0,0,1,0,0),// override_synth_prop_863_930_div5_lbw60k.xml// Synth: Set recommended RTRIM to 7HW_REG_OVERRIDE(0x4038,0x0037),...(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_5k = {.commandNo = 0x3807,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx.startTime = 0x00000000,....pRegOverride = pOverrides_5k,.centerFreq = 0x0364,.intFreq = 0x8000,.loDivider = 0x05 };// CMD_FS // Frequency Synthesizer Programming Command rfc_CMD_FS_t RF_cmdFs_5k = {.commandNo = 0x0803,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx.startTime = 0x00000000,.startTrigger.triggerType = 0x0,... };// CMD_PROP_TX // Proprietary Mode Transmit Command rfc_CMD_PROP_TX_t RF_cmdPropTx_5k = {.commandNo = 0x3801,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx... };// CMD_PROP_RX // Proprietary Mode Receive Command rfc_CMD_PROP_RX_t RF_cmdPropRx_5k = {.commandNo = 0x3802,.status = 0x0000,.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx... };在PHY间更改,您可以简单地用一个 PHY 打开 RF drive,做任何您想做的事情,然后关闭drive,然后用另一个 PHY 再次打开它。
Smartrf Studio中导出的代码同时只会给你一个PHY,所以你首先要导出一个PHY,重命名它,然后导出另一个,并将设置粘贴到第一个的文件中(或者可以在代码中有两个不同的SmartRF_settings文件,不同的 PHY 具有不同的名称。)