Thread 中讨论的其他器件: SysConfig
在"CC2651P3:DIO_21"主题中、Ryan Brown 发布 了一个 ti_radio_config.c、用于使用采用 RKP 封装(40引脚)的 CC2651P3提供+10dBm 输出功率。 当时我没有硬件、因此无法测试。 现在我有硬件、我的配置有问题。
发布的文件包含此电源表:
RF_TxPowerTable_Entry txPowerTable_2400_pa5_10[TXPOWERTABLE_2400_PA5_10_SIZE]=
{
{-20、RF_TxPowerTable_DEFAULT_PA_Entry (8、3、0、2)}、 // 0x04C8
{-18、RF_TxPowerTable_DEFAULT_PA_Entry (10、3、0、2)}、 // 0x04CA
{-15、RF_TxPowerTable_DEFAULT_PA_Entry (13、3、0、3)}、 // 0x06CD
{-12、RF_TxPowerTable_DEFAULT_PA_Entry (16、3、0、5)}、 // 0x0AD0
{-10、RF_TxPowerTable_DEFAULT_PA_Entry (19、3、0、5)}、 // 0x0AD3
{-9、RF_TxPowerTable_default_pa_entry (20、3、0、6)}、 // 0x0CD4
{-6、RF_TxPowerTable_default_pa_entry (19、2、0、11)}、 // 0x1693
{-5、RF_TxPowerTable_default_pa_entry (21、2、0、11)}、 // 0x1695
{-3、RF_TxPowerTable_DEFAULT_PA_Entry (25、2、0、12)}、 // 0x1899
{0、RF_TxPowerTable_DEFAULT_PA_Entry (29、1、0、22)}、 // 0x2C5D
{1、RF_TxPowerTable_DEFAULT_PA_Entry (33、1、0、25)}、 // 0x3261
{2、RF_TxPowerTable_DEFAULT_PA_Entry (38、1、0、31)}、 // 0x3E66
{3、RF_TxPowerTable_DEFAULT_PA_Entry (47、1、0、36)}、 // 0x486F
{4、RF_TxPowerTable_DEFAULT_PA_Entry (32、0、0、65)}、 // 0x8220
{5、RF_TxPowerTable_DEFAULT_PA_Entry (46、0、0、59)}、 // 0x762E
{6、RF_TxPowerTable_HIGH_PA_Entry (42、0、1、39、 20)}、// 0x144F2A
{7、RF_TxPowerTable_HIGH_PA_Entry (31、1、0、20、 20)}、// 0x14285F
{8、RF_TxPowerTable_HIGH_PA_Entry (26、1、1、25、 16)}、// 0x10335A
{9、RF_TxPowerTable_HIGH_PA_Entry (31、1、1、31、 16)}、// 0x103F5F
{10、RF_TxPowerTable_HIGH_PA_Entry (38、1、1、39、 16)}、// 0x104F66
RF_TxPowerTable_termination_entry
};
但是,当我使用此表时, 如果任何大于5dBm 的值,RF_setTxPower()都将失败。 我正在使用 rfDiagnostics 示例项目。 我在 radio.c 中的这个位置设置一个断点:
bool Radio_setPower (INT8_t i8TxPowerDbm)
{
rf_TxPowerTable_value newValue;
newValue =
RF_TxPowerTable_findValue (((RF_TxPowerTable_Entry *) PhySettings_supportedPhys[currentPhyNumber].rf_pTxPowerTable、
i8TxPowerDbm);
if (newValue.rawValue =RF_TxPowerTable_INVALID_VALUE)
{
返回 false;
}
-> RF_Stat rfStatus = RF_setTxPower (rfHandle、newValue);
if (rfStatus =RF_StatusSuccessess)
{
返回 true;
}
其他
{
返回 false;
}
}
当我尝试设置+10dBm 时, 使用有效的 rfHandle 调用 RF_setTxPower(),newValue = 0x104F66,这是 PowerTable 中的正确值。 但是, RF_setTxPower()返回 RF_StatusInvalidParamsError。 当我尝试设置+5dBm 或更低时, RF_setTxPower()返回 RF_Successess。
我对 RF_setTxPower()没有源访问权限,因此我不知道问题是什么。
此致、
Andy