Hello,
Setting power level in "BLE Host stack QN9080DK MCUXpresso SDK 2.2.0" stack has NO effect on TX advertisement current level, with these two power level the peak current is still 0.9mA:
Gap_SetTxPowerLevel(0u, gTxPowerAdvChannel_c)
Gap_SetTxPowerLevel(255u, gTxPowerAdvChannel_c)
BleApp_GenericCallback(const gapGenericEvent_t* const pGenericEvent)
{
switch(pGenericEvent->eventType)
{
case gInitializationComplete_c:
/* set TX power */
assert(Gap_SetTxPowerLevel(255u, gTxPowerAdvChannel_c) == gBleSuccess_c);
assert(Gap_SetTxPowerLevel(255u, gTxPowerConnChannel_c) == gBleSuccess_c);
break;
...
case gTxPowerLevelSetComplete_c:
/* this is called twice, break point stops here */
break;
}
Also RSSI on RX side doesn't seem to be correlating.
What am I doing wrong?
Solved! Go to Solution.
Hello ,
The register that needs to be modified it's the ANA_CTRL0[PA_POWER], the API to access this register is RF_SetTxPowerLevel(). It can be set between 0x00 (minimum - -30dBm) and 0xFF (maximum - +2dBm).
By default this field is not touched, so it is set to 0x7F which corresponds to 0dBm.
Regards,
Estephania
Controller_SetTxPowerLevel() is not an active interface for QN908X.
Hello ,
The register that needs to be modified it's the ANA_CTRL0[PA_POWER], the API to access this register is RF_SetTxPowerLevel(). It can be set between 0x00 (minimum - -30dBm) and 0xFF (maximum - +2dBm).
By default this field is not touched, so it is set to 0x7F which corresponds to 0dBm.
Regards,
Estephania