This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530+CC2591加PA放到功能,如果修改协议栈????

Other Parts Discussed in Thread: CC2591

ZStack-CC2530-2.5.1a是我用的协议栈,我要用PA的功能

我做了如下修改:

1,修改hal_boar_cfg.h文件

#define xHAL_PA_LNA 修改成  #define HAL_PA_LNA

2.修改mac_radio_defs.c

#if defined HAL_PA_LNA || defined MAC_RUNTIME_CC2591
const uint8 CODE macRadioDefsTxPwrCC2591[] =
{
 // 20,  /* tramsmit power level of the first entry */这是协议栈默认的
  1,  /* tramsmit power level of the first entry *///这个是我修改的
  (uint8)(int8)10, /* transmit power level of the last entry */
   /*  20 dBm */  0xF5,   /* characterized as 20 dBm in datasheet *///我另外添加了一行
  /*  20 dBm */   0xE5,   /* characterized as 20 dBm in datasheet */
  /*  19 dBm */   0xD5,   /* characterized as 19 dBm in datasheet */
  /*  18 dBm */   0xC5,   /* characterized as 18 dBm in datasheet */
  /*  17 dBm */   0xB5,   /* characterized as 17 dBm in datasheet */
  /*  16 dBm */   0xA5,   /* characterized as 16 dBm in datasheet */
  /*  15 dBm */   0xA5,
  /*  14 dBm */   0x95,   /* characterized as 14.5 dBm in datasheet */
  /*  13 dBm */   0x85,   /* characterized as 13 dBm in datasheet */
  /*  12 dBm */   0x85,
  /*  11 dBm */   0x75,   /* characterized as 11.5 dBm in datasheet */
  /*  10 dBm */   0x65    /* characterized as 10 dBm in datasheet */
};
#endif

以下是PA功能开启
    /* P1_1 -> PAEN */
    RFC_OBS_CTRL0 = RFC_OBS_CTRL_PA_PD_INV;
    OBSSEL1       = OBSSEL_OBS_CTRL0;
    
      /* P1_2 -> EN (LNA control) *//
    RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;
    OBSSEL2       = OBSSEL_OBS_CTRL1;

----------------------------------------------------------------------------------------------------------------------------------------------------------

以上是我修改的协议 针对PA功能的,请问,还需要修改哪里吗?