首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > Wireless >

CC1101中遇到的收发有关问题有关问题

2012-08-10 
CC1101中遇到的收发问题问题硬件:stm32f101x8 + CC1101工作流程:一发射盒通过RF接收到接收盒发送的开启命

CC1101中遇到的收发问题问题
硬件:stm32f101x8 + CC1101
工作流程:一发射盒通过RF接收到接收盒发送的开启命令,开始采集数据并将数据打包发送,接收到接收盒发送的关闭命令时,结束采集,并回复命令。
遇到的问题:发射盒开始可以正常工作,如果长时间处于接收状态,就会无法接收到发送盒发送的命令,哪位同仁遇到过同样的问题啊,谢谢赐教。
寄存器配置如下:
TI_CC_SPIWriteReg(TI_CCxxx0_IOCFG2, 0x29); // GDO2 output pin config.
  TI_CC_SPIWriteReg(TI_CCxxx0_IOCFG0, 0x06); // GDO0 output pin config.
  TI_CC_SPIWriteReg(TI_CCxxx0_FIFOTHR, 0x07); // 0x03 FIFOTHR
  TI_CC_SPIWriteReg(TI_CCxxx0_PKTLEN, 0xff); // Packet length.
  TI_CC_SPIWriteReg(TI_CCxxx0_PKTCTRL1, 0x04); // Packet automation control.
  TI_CC_SPIWriteReg(TI_CCxxx0_PKTCTRL0, 0x45); // Packet automation control.
  TI_CC_SPIWriteReg(TI_CCxxx0_ADDR, 0x00); // Device address.
  TI_CC_SPIWriteReg(TI_CCxxx0_CHANNR, 0x00); // Channel number.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCTRL1, 0x0C/*0x06*/); // Freq synthesizer control.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCTRL0, 0x00); // Freq synthesizer control.
  TI_CC_SPIWriteReg(TI_CCxxx0_FREQ2, 0x10); // Freq control word, high byte
  TI_CC_SPIWriteReg(TI_CCxxx0_FREQ1, 0xA7/*0xB1*/); // Freq control word, mid byte.
  TI_CC_SPIWriteReg(TI_CCxxx0_FREQ0, 0x62/*0x3B*/); // Freq control word, low byte.
  TI_CC_SPIWriteReg(TI_CCxxx0_MDMCFG4, 0x2D/*0xFD*/); // Modem configuration. BW=0x2D--541K FD--580K rate 250
  TI_CC_SPIWriteReg(TI_CCxxx0_MDMCFG3, 0x3B); // Modem configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_MDMCFG2, 0x13); // Modem configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_MDMCFG1, 0x22); // Modem configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_MDMCFG0, 0xF8); // Modem configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_DEVIATN, 0x62/*0x15*/); // Modem dev (when FSK mod en) 0x15-5.15K 0x62--127K
  TI_CC_SPIWriteReg(TI_CCxxx0_MCSM1 , 0x3F); //MainRadio Cntrl State Machine
  TI_CC_SPIWriteReg(TI_CCxxx0_MCSM0 , 0x18); //MainRadio Cntrl State Machine
  TI_CC_SPIWriteReg(TI_CCxxx0_FOCCFG, 0x1D/*0x16*/); // Freq Offset Compens. Config
  TI_CC_SPIWriteReg(TI_CCxxx0_BSCFG, 0x1C/*0x6C*/); // Bit synchronization config.
  TI_CC_SPIWriteReg(TI_CCxxx0_AGCCTRL2, 0xC7/*0x03*/); // AGC control.
  TI_CC_SPIWriteReg(TI_CCxxx0_AGCCTRL1, 0x00/*0x40*/); // AGC control.
  TI_CC_SPIWriteReg(TI_CCxxx0_AGCCTRL0, 0xB0/*0x91*/); // AGC control.
  TI_CC_SPIWriteReg(TI_CCxxx0_WORCTRL, 0xF8); //0xFB Worctrl
  TI_CC_SPIWriteReg(TI_CCxxx0_FREND1, 0xB6/*0x56*/); // Front end RX configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_FREND0, 0x10); // Front end RX configuration.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCAL3, 0xEA/*0xE9*/); // Frequency synthesizer cal.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCAL2, 0x2A); // Frequency synthesizer cal.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCAL1, 0x00); // Frequency synthesizer cal.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSCAL0, 0x1F); // Frequency synthesizer cal.
  TI_CC_SPIWriteReg(TI_CCxxx0_FSTEST, 0x59); // Frequency synthesizer cal.
  TI_CC_SPIWriteReg(TI_CCxxx0_TEST2, 0x88/*0x81*/); // Various test settings.
  TI_CC_SPIWriteReg(TI_CCxxx0_TEST1, 0x31/*0x35*/); // Various test settings.
  TI_CC_SPIWriteReg(TI_CCxxx0_TEST0, 0x09); // Various test settings.

[解决办法]
传说是锁相环的漂移,把cc1101设置为空闲状态,在切换到接收模式,可以自动校准

热点排行