CC2530 控制输出功率的寄存器是 TXPOWER:
Zigbee-CC2530开发板协议栈-改动发射功率

推荐功率设置:

Zigbee-CC2530开发板协议栈-改动发射功率

协议栈默认的设置是 0xd5,为了扩展信号传输的距离,我把TXPOWER寄存器值改为0xf5, 此时输出功率为4.5dBm.在mac_radio.c文件,做了例如以下改动:

void macRadioSetTxPower(uint8 txPower)
{
halIntState_t s;

/* if the selected dBm is out of range, use the closest available */
if (txPower > MAC_RADIO_TX_POWER_MAX_DBM)
{
txPower = MAC_RADIO_TX_POWER_MAX_DBM;
}

/*
* Set the global variable reqTxPower. This variable is referenced
* by the function macRadioUpdateTxPower() to write the radio register.
*
* A lookup table is used to translate the power level to the register
* value.
*/
HAL_ENTER_CRITICAL_SECTION(s);
reqTxPower = macRadioDefsTxPowerTable[txPower];
HAL_EXIT_CRITICAL_SECTION(s);

/* update the radio power setting */
//************** 自己改动 ******* 
reqTxPower = 0xF5;
//******************************* 
macRadioUpdateTxPower();
}

相关文章:

  • 2022-01-13
  • 2021-10-19
  • 2022-01-23
  • 2022-12-23
  • 2021-06-26
  • 2021-09-10
  • 2022-01-11
  • 2021-10-13
猜你喜欢
  • 2021-07-17
  • 2021-06-06
  • 2021-06-12
  • 2021-12-23
  • 2021-07-26
  • 2021-07-28
  • 2022-12-23
相关资源
相似解决方案