Other Parts Discussed in Thread: SYSCONFIG
In the thread "CC2651P3: DIO_21" Ryan Brown posted a ti_radio_config.c to use for +10dBm output power using the CC2651P3 in RKP package (40-pin). At the time I did not have hardware so I could not test it. Now I have hardware and I am having a problem with this config.
The posted file contains this power table:
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
};
However, when I use this table, RF_setTxPower() fails for any value larger than 5dBm. I am using the rfDiagnostics example project. I set a breakpoint at this location in 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)
{
return false;
}
-> RF_Stat rfStatus = RF_setTxPower(rfHandle, newValue);
if(rfStatus == RF_StatSuccess)
{
return true;
}
else
{
return false;
}
}
When I try to set +10dBm, RF_setTxPower() is called with a valid rfHandle, and newValue = 0x104F66, which is the correct value from the PowerTable. However, RF_setTxPower() returns RF_StatInvalidParamsError. When I try to set +5dBm or lower, RF_setTxPower() returns RF_StatSuccess.
I don't have source access to RF_setTxPower() so I don't know what the issue is.
Regards,
Andy