有关CC1101的疑问
我快被CC1101 的WOR功能搞的疯掉了,按照手册AN047和网上的一些资料配置后,就是不能进行唤醒,
设置睡眠15ms,发送采取2.4K的速率,每次发送30个字节。GDO2用做唤醒指示。就是不能实现。如果采取查询寄存器的方式,GDO2会有指示。
现在怀疑这个片子是不是具备这个功能?有没有人做过?能不能提供代码以供参考!感谢!
请把你的寄存器值贴出来
代码如下:
void CC1101_InitWOR(void)
{
halSpiStrobe(CCxxx0_SIDLE);
halSpiWriteReg(CCxxx0_MCSM0,0x18);//在TX,RX后 自动校准
halSpiWriteReg(CCxxx0_MCSM1,0x30);
halSpiWriteReg(CCxxx0_MCSM2,0x09); //RX_TIME_QUAL = 1, RX_TIME =1
halSpiWriteReg(CCxxx0_WOREVT1,0x01);// tEVENT0 = 14.34 ms,
halSpiWriteReg(CCxxx0_WOREVT0,0xF2);
halSpiWriteReg(CCxxx0_WORCTRL,0x38);// EVENT1 = 3, WOR_RES = 0
halSpiWriteReg(CCxxx0_IOCFG2,0x06);
halSpiStrobe(CCxxx0_SWORRST);//复位到 事件1
halSpiStrobe(CCxxx0_SWOR); //进入WOR状态
}
请帮我看看,GDO2用示波器测量一点变化也没有。发送端数据是2.4k波特率。每次发送30个字节。连续发送5次。
谢谢!
其他寄存器设置如下:
//0x00, //FSCTRL2
0x06, // FSCTRL1 Frequency synthesizer control.
0x00, // FSCTRL0 Frequency synthesizer control.
0x10, // FREQ2 Frequency control word, high byte.
0xB2, // FREQ1 Frequency control word, middle byte.
0x3B, // FREQ0 Frequency control word, low byte.
0xF6, // MDMCFG4 Modem configuration.
0x83, // MDMCFG3 Modem configuration.
0x13, // MDMCFG2 Modem configuration.
0x22, // MDMCFG1 Modem configuration.
0xF8, // MDMCFG0 Modem configuration.
0x04, // CHANNR Channel number.
0x15, // DEVIATN Modem deviation setting (when FSK modulation is enabled).
0x56, // FREND1 Front end RX configuration.
0x10, // FREND0 Front end RX configuration.
0x18, // MCSM0 Main Radio Control State Machine configuration.
0x16, // FOCCFG Frequency Offset Compensation Configuration.
0x6C, // BSCFG Bit synchronization Configuration.
0x03, // AGCCTRL2 AGC control.
0x40, // AGCCTRL1 AGC control.
0x91, // AGCCTRL0 AGC control.
0xE9, // FSCAL3 Frequency synthesizer calibration.
0x2A, // FSCAL2 Frequency synthesizer calibration.
0x00, // FSCAL1 Frequency synthesizer calibration.
0x1F, // 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.
0x67,//0x04, // PKTCTRL1 Packet automation control.可变数据包长度
0x05, // PKTCTRL0 Packet automation control.
0x49, // ADDR Device address.
0x20, // PKTLEN Packet length.
http://www.deyisupport.com/question_answer/analog/wireless_connectivity/f/45/p/8173/103717.aspx#103717
有source code,供参考。