请问有没有人用功放RFX2401之后成功进入休眠状态的?
如题,我没用RFX2401是可以进入睡眠状态的,测量电流的结果也是对的。但是用了RFX2401之后就不行了。
我的硬件接线是P1_1接TX,P1_4接RX, macRadioTurnOnPower()如下:
void macRadioTurnOnPower(void)
{
/* Enable RF error trap */
MAC_MCU_RFERR_ENABLE_INTERRUPT();
#if defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590)
/* AGCCTRL1 for CC2590 or CC2591 */
AGCCTRL1 = 0x16;
/* CC2591 PA/LNA control configuration
* P0_7 -> HGM
* P1_1 -> PA_EN
* P1_4 -> EN
*/
/* P0_7 */
// HAL_PA_LNA_RX_HGM(); //P0_7不用
/* P1_1 */
RFC_OBS_CTRL0 = RFC_OBS_CTRL_PA_PD_INV;
OBSSEL1 = OBSSEL1_OBS_CTRL0;
/* P1_4 */
// RFC_OBS_CTRL1 = RFC_OBS_CTRL_LNAMIX_PD_INV;//
// OBSSEL4 = OBSSEL4_OBS_CTRL4;
P1SEL &= ~0x10;
P1DIR |= 0x10;
P1_4 = 1;//P1_4置为1
#endif /* defined (HAL_PA_LNA) || defined (HAL_PA_LNA_CC2590) */
if (macChipVersion <= REV_B)
{
/* radio initializations for disappearing RAM; PG1.0 and before only */
MAC_RADIO_SET_PAN_ID(macPib.panId);
MAC_RADIO_SET_SHORT_ADDR(macPib.shortAddress);
MAC_RADIO_SET_IEEE_ADDR(macPib.extendedAddress.addr.extAddr);
}
}
然后我修改了HAL_PA_LNA_RX_LGM()与HAL_PA_LNA_RX_HGM(),改成了更改P1_4的电平(原来是改变P0_7)但是无法进入休眠,
已在http://www.deyisupport.com/question_answer/wireless_connectivity/zigbee/f/104/p/130462/364405.aspx#364405中回复