Hello,
we are using two different versions of TI-RTOS (V2.21 and V3.10).
Now, I found a problem with setting the TX power at runtime. The first frame after setting the tx power will be sent with the new tx power. But the next frames will be sent with the old tx power.
I use the following function to open the RF driver:
m_rf_handle = RF_open( &m_rf_object, &m_rf_prop, (RF_RadioSetup*)&m_rf_cmd_prop_radio_div_setup, &rf_params );
In m_rf_cmd_prop_radio_div_setup.txPower is the default tx power. The function is called once at startup.
At runtime, I set the tx power with the following function:
*((uint16_t *)&m_rf_cmd_set_tx_power.txPower) = power_to_set;
RF_runImmediateCmd( m_rf_handle, (uint32_t*)&m_rf_cmd_set_tx_power );
But as described above, the new tx power will only be used for the first frame after setting.
The problem only occurs, if the RF controller is powered down in the meantime (if the rf controller is always in RX or TX mode, the new tx power will be used for the following frames, too.)
To solve the problem, I use the following function (instead of the above one):
RF_TxPowerTable_Value power;
power.rawValue = power_to_set;
power.__dummy = 0;
power.paType = RF_TxPowerTable_DefaultPA ;
RF_setTxPower(m_rf_handle, power);
But this function, is not available in TI-RTOS V2.21.
What is the difference between using RF_setTxPower() and RF_runImmediateCmd()?
Why does RF_runImmediateCmd() not store the new tx power?
Thanks and best regards
Heiko