微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI无线射频设计 > 多个从机设置地址过滤+wor,主机发送唤醒数据能够实现对应地址从节点的唤醒功能

多个从机设置地址过滤+wor,主机发送唤醒数据能够实现对应地址从节点的唤醒功能

时间:12-23 整理:3721RD 点击:

求助大神:现在我从机设置了wor+地址过滤,大部分时间从机都处于wor状态。主机不定时发送唤醒数据,要求多个从机依次醒来。现在从机已经设置了地址过滤,但是每个从机都可以进入wor中断,在中断退出LPM3,醒来之后可以实现地址过滤。但是现在实验发现,地址不对应的从节点也可以进入中断(这是不希望看到的)

所以特想问下,cc1101如果设置地址过滤,能否实现单个节点从机的唤醒。如果可以应该怎么做呢

以下是我的寄存器配置

0x00, // FSCTRL2;
0x08, // FSCTRL1 Frequency synthesizer control.
0x00, // FSCTRL0 Frequency synthesizer control.
0x11, // FREQ2 Frequency control word, high byte. 10
0x4E, // FREQ1 Frequency control word, middle byte. A7
0xC4, // FREQ0 Frequency control word, low byte. 62
0x5B, // MDMCFG4 Modem configuration.
0xF8, // MDMCFG3 Modem configuration. 空中波特率是100K
0x03, // MDMCFG2 Modem configuration.
0x22, // MDMCFG1 Modem configuration.
0xF8, // MDMCFG0 Modem configuration.

0x70, // CHANNR Channel number.
0x47, // DEVIATN Modem deviation setting (when FSK modulation is enabled).
0xB6, // FREND1 Front end RX configuration.
0x10, // FREND0 Front end RX configuration.
0x18, // MCSM0 Main Radio Control State Machine configuration.
0x1D, // FOCCFG Frequency Offset Compensation Configuration.
0x1C, // BSCFG Bit synchronization Configuration.
0xC7, // AGCCTRL2 AGC control.
0x00, // AGCCTRL1 AGC control.
0xB2, // AGCCTRL0 AGC control.

0xEA, // FSCAL3 Frequency synthesizer calibration.
0x2A, // FSCAL2 Frequency synthesizer calibration.
0x00, // FSCAL1 Frequency synthesizer calibration.
0x11, // FSCAL0 Frequency synthesizer calibration.
0x59, // FSTEST Frequency synthesizer calibration.
0x81, // TEST2 Various test settings.
0x35, // TEST1 Various test settings.
0x09, // TEST0 Various test settings.
0x0B, // IOCFG2 GDO2 output pin configuration.
0x06, // IOCFG0D GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.

0x05, // PKTCTRL1 Packet automation control. 
0x45, // PKTCTRL0 Packet automation control.
0x01, // ADDR Device address. //接收数据包滤波地址
0x3f // PKTLEN Packet length.

wor设置及中断函数:

void wor_cc1101(void)
{
halSpiStrobe(CCxxx0_SCAL);
halSpiWriteReg(CCxxx0_IOCFG2, 0x06);
halSpiWriteReg(CCxxx0_IOCFG0, 0x06);
halSpiWriteReg(CCxxx0_WORCTRL, 0x48); /
halSpiWriteReg(CCxxx0_WOREVT1, 0xff);
halSpiWriteReg(CCxxx0_WOREVT0, 0xff);

halSpiWriteReg(CCxxx0_MCSM2, 0x03); 
halSpiWriteReg(CCxxx0_MCSM0, 0x18);
halSpiWriteReg(CCxxx0_MCSM1, 0x00);

halSpiStrobe(CCxxx0_SWORRST); // Resets the real time clock
halSpiStrobe(CCxxx0_SIDLE);
halSpiStrobe(CCxxx0_SWOR);
}

void INIT_GDO2_INTERRUPT(void)
{
GDO2_0;
P2SEL &=~ BIT6;
P2DIR &=~ BIT6; //input
P2IFG &= ~BIT6; //清中断标志
P2IES |= BIT6; //
P2IE |= BIT6; //enable
}

#pragma vector = PORT2_VECTOR
__interrupt void GDO_2()
{
CC1101.WakeUp_Flag = 1; //唤醒标志位
TA2.Flag_100ms = 1;
TA2.Count_100ms_Flag = 1;
WORTurnOff();
P2IE &= ~BIT6;
P2IFG &= ~BIT6;
LPM3_EXIT;

}

AN047 上没有提到WOR 当中还有地址过滤的功能。地址位已经在 Packet 的数据部分了。

理论上我的理解是即使不能控制单个节点WOR 唤醒,也可以在唤醒后判断地址是否匹配,如果不匹配就可以迅速重回睡眠。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top