工具与软件:
您好!
打开对讲机时、我尝试更改对讲机的参数 centerFreq、loDivider。 运行以下命令后:
1) 1) RF_postCmd
2) 2) RF_CONTROL
3) 3) RF_Yield
应使用什么命令为射频内核加电、以影响新的设置?
谢谢!
Alex
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.
工具与软件:
您好!
打开对讲机时、我尝试更改对讲机的参数 centerFreq、loDivider。 运行以下命令后:
1) 1) RF_postCmd
2) 2) RF_CONTROL
3) 3) RF_Yield
应使用什么命令为射频内核加电、以影响新的设置?
谢谢!
Alex
你好、Siri、
感谢您的快速响应。
因为我需要更改许多参数:frequency、fractFreq、centerFreq、intFreq、loDivider、 对于跳频无线电、使用 RF_OPEN 和 RF_CLOSE 的 TtxPower 很耗时:~15ms.I 需要做得更快。 这就是我尝试更新设置、关闭射频内核和打开射频内核的原因。 我需要多长时间? 或者是否有其他解决方案?
由于某些原因、您推荐的操作顺序不起作用:对讲机不接受数据、也不进行 RF 传输。 请验证使用的函数顺序是否正确:
1)使用默认频率和功率初始化无线电、Executiog RF_OPEN。
2) 2)设置为跳频:使用更新的结构 RFC_CMD_PROP_RADIO_DIV_SETUP_PA_t 执行 RF_postCmd
3) 3)设置跳频:使用更新的结构 RFC_CMD_FS_t 执行 RF_postCmd
4) 4)设置功率: 使用更新的结构 RFC_CMD_SET_TX_POWER_t 执行 RF_postCmd
5)更新设置命令: RF_Cntrl = RF_CONTROL (rfHandle、RF_CTRL_UPDATE_SETUP_CMD、NULL)。
6) 6)执行 rf_yield;
5)加载 指向 Tx 数据的第一部分的指针。
6) 6)使用具有更新结构 RFC_CMD_PROP_TX_ADV_t 的 RF_postCmd 开始传输
7)无线电不进入传输模式:无射频发射,无采集数据。
您在我的序列中看到了什么问题吗?
谢谢!
Alex
无法确切地确定您的代码是什么样的、因此我从 SDK 中获取了 rfPacketTx 示例并进行了一个小型演示。
我使用默认的50kbps PHY、在868 MHz @ 10dBm OUT 时的数据包发送和915 MHz 以0dBm OUT 时的数据包发送之间进行切换。
代码如下:
void *mainThread(void *arg0)
{
RF_Params rfParams;
RF_Params_init(&rfParams);
GPIO_setConfig(CONFIG_GPIO_GLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
GPIO_write(CONFIG_GPIO_GLED, CONFIG_GPIO_LED_OFF);
RF_cmdPropTx.pktLen = PAYLOAD_LENGTH;
RF_cmdPropTx.pPkt = packet;
RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW;
uint8_t i;
for (i = 0; i < PAYLOAD_LENGTH; i++)
{
packet[i] = rand();
}
// open the rfDriver
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
while(1)
{
packet[0] = (uint8_t)(seqNumber >> 8);
packet[1] = (uint8_t)(seqNumber++);
// Set freq 868 MHz
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
// Transmit packet at 868 MHz
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
// Change frequency
RF_cmdFs.frequency = 915;
RF_cmdPropRadioDivSetup.centerFreq = 915;
// Set output power to 0
RF_setTxPower(rfHandle, RF_TxPowerTable_findValue(txPowerTable, 0));
// Make sure the setup command is being updated
status = RF_control(rfHandle, RF_CTRL_UPDATE_SETUP_CMD, NULL);
RF_yield(rfHandle);
packet[0] = (uint8_t)(seqNumber >> 8);
packet[1] = (uint8_t)(seqNumber++);
// Set freq to 915 MHz
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
// Transmit packet at 915 MHz
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
// Change frequency back to 868 MHz
RF_cmdFs.frequency = 868;
RF_cmdPropRadioDivSetup.centerFreq = 868;
// Set output power to 10
RF_setTxPower(rfHandle, RF_TxPowerTable_findValue(txPowerTable, 10));
// Make sure the setup command is being updated
status = RF_control(rfHandle, RF_CTRL_UPDATE_SETUP_CMD, NULL);
RF_yield(rfHandle);
}
}
测量从退出 TX (在一个频率下)到进入下一个频率下大约1ms:

Siri