|||
RF输出功率可以由RF寄存器TRCTRLL.PA_LEVEL控制,具体设置参数可参考下表:
ZStack中有如下定义:
const uint8 CODE macRadioDefsTxPowerTable[] =
{
/* 0 dBm */ 0x5F, /* characterized as -0.4 dBm in datasheet */
/* -1 dBm */ 0x3F, /* characterized as -0.9 dBm in datasheet */
/* -2 dBm */ 0x3F,
/* -3 dBm */ 0x1B, /* characterized as -2.7 dBm in datasheet */
/* -4 dBm */ 0x17, /* characterized as -4.0 dBm in datasheet */
/* -5 dBm */ 0x13,
/* -6 dBm */ 0x13, /* characterized as -5.7 dBm in datasheet */
/* -7 dBm */ 0x13,
/* -8 dBm */ 0x0F, /* characterized as -7.9 dBm in datasheet */
/* -9 dBm */ 0x0F,
/* -10 dBm */ 0x0F,
/* -11 dBm */ 0x0B, /* characterized as -10.8 dBm in datasheet */
/* -12 dBm */ 0x0B,
/* -13 dBm */ 0x0B,
/* -14 dBm */ 0x0B,
/* -15 dBm */ 0x07, /* characterized as -15.4 dBm in datasheet */
/* -16 dBm */ 0x07,
/* -17 dBm */ 0x07,
/* -18 dBm */ 0x07,
/* -19 dBm */ 0x06, /* characterized as -18.6 dBm in datasheet */
/* -20 dBm */ 0x06,
/* -21 dBm */ 0x06,
/* -22 dBm */ 0x06,
/* -23 dBm */ 0x06,
/* -24 dBm */ 0x06,
/* -25 dBm */ 0x03 /* characterized as -25.2 dBm in datasheet */
};
缺省设置为0dBm,即
#define MAC_RADIO_TX_POWER_DEFAULT 0x1F
macPhyTxPower = MAC_RADIO_TX_POWER_DEFAULT;
MAC_RADIO_SET_TX_POWER(macPhyTxPower);
至于macRadioDefsTxPowerTable中0dBm为0x5F而不是0x1F,是因为0x1F只代表TRCTRLL的低5位即TRCTRLL.PA_LEVEL,而0x5F则包含了高3位的缘故。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-22 14:21
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社