CC1110RF寄存器使用SmartRF Studio 7配置,用一个CC1110一直发包,另一个CC1110根据PKTSTATUS判断CS的值,为1时表示周围有设备在发包,等待;为0时空闲,可以发包。可是使用IAR查看寄存器发现CS一直都是0,为什么呢?明明有设备一直在发包。后来仔细看了一下SmartRF Studio 7配置的寄存器,发现SmartRF Studio 7把相对值和绝对值都disable了,接着有依次使用了相对值和绝对值,可是效果还是一样。请问是什么问题呢?
Albin Zhang:
可以看一下user's guide的文档,不知你和CCA相关的寄存器都看了吗?比如CCA_MODE[1:0] 等。
BR.AZ
xiaoming su:
回复 Albin Zhang:
/* RF settings SoC: CC1110, from smartRFstudio */PKTCTRL0 = 0x05; // packet automation control CHANNR = 0x02; // channel number FSCTRL1 = 0x08; // frequency synthesizer control FREQ2 = 0x10; // frequency control word, high byte FREQ1 = 0xA7; // frequency control word, middle byte FREQ0 = 0x62; // frequency control word, low byte MDMCFG4 = 0xCA; // modem configuration MDMCFG3 = 0x83; // modem configuration MDMCFG2 = 0x93; // modem configuration DEVIATN = 0x35; // modem deviation setting MCSM0 = 0x18; // main radio control state machine configuration FOCCFG = 0x16; // frequency offset compensation configuration AGCCTRL2 = 0x40; // agc control FSCAL3 = 0xE9; // frequency synthesizer calibration FSCAL2 = 0x2A; // frequency synthesizer calibration FSCAL1 = 0x00; // frequency synthesizer calibration FSCAL0 = 0x1F; // frequency synthesizer calibration TEST1 = 0x31; // various test settings TEST0 = 0x09; // various test settings PA_TABLE0 = 0xC0; // pa power setting 0 //************************************************ //载波监听 IOCFG0 = 0x09; // radio test signal configuration (p1_5) MCSM1 = 0x20; // main radio control state machine configuration //If RSSI below threshold AGCCTRL1 = 0x50; //relative threshold and absoluted threshold