A、B两种板子,每种板子做了几块,A板面积38mm*70mm,B板面积50mm*130mm。
315MHz。
B板发送,另一块B收接收正常,没有误码;
B板发送,另一块A板接收,误码率很高,约有40%;
A板发送,另一块B板接收正常,几乎没有误码;
A板发送,另一块A板几乎收不到数据;
Butterfly:
建议看下A板的接收机灵敏度
guangquan li:
回复 Butterfly:
首先感谢您的答复。
我会测试一下灵敏度,如果灵敏度有问题,一般什么原因造成的呢?电源噪声?晶体精度?匹配电路参数?PCB面积?
我已经确认不是电源的问题,电源AB板互换过,没有影响。
Butterfly:
回复 guangquan li:
PCB Layout有很大关系,微带线Componet值是否有更换?
思路就是先看传导,再看天线
Nutcracker:
建议按下面顺序测试和 Debug:
先测测晶振的频率误差;
再测发送功率;
灵敏度不太好测,最后有需要再测试。
guangquan li:
回复 Nutcracker:
上图是A板的频谱图,由图可以看出,A板发射信号时载波频率会变化。变化值约为250kHz,载波无论怎么变化,deviation是正确,都是设定值(约为49kHz)。
上图是B板发射时的频谱图,与程序设定值相符。
A板、B板的晶体对换后,A板仍然不正常,B板仍然正常。
guangquan li:
回复 guangquan li:
CC1101寄存器的配置如下,两种板子配置相同。其它寄存器为默认值
typedef struct S_RF_SETTINGS{ uint8_t FSCTRL1; // Frequency synthesizer control. uint8_t FSCTRL0; // Frequency synthesizer control. uint8_t FREQ2; // Frequency control word, high uint8_t. uint8_t FREQ1; // Frequency control word, middle uint8_t. uint8_t FREQ0; // Frequency control word, low uint8_t. uint8_t MDMCFG4; // Modem configuration. uint8_t MDMCFG3; // Modem configuration. uint8_t MDMCFG2; // Modem configuration. uint8_t MDMCFG1; // Modem configuration. uint8_t MDMCFG0; // Modem configuration. uint8_t CHANNR; // Channel number. uint8_t DEVIATN; // Modem deviation setting (when FSK modulation is enabled). uint8_t FREND1; // Front end RX configuration. uint8_t FREND0; // Front end RX configuration. uint8_t MCSM0; // Main Radio Control State Machine configuration. uint8_t FOCCFG; // Frequency Offset Compensation Configuration. uint8_t BSCFG; // Bit synchronization Configuration. uint8_t AGCCTRL2; // AGC control. uint8_t AGCCTRL1; // AGC control. uint8_t AGCCTRL0; // AGC control. uint8_t FSCAL3; // Frequency synthesizer calibration. uint8_t FSCAL2; // Frequency synthesizer calibration. uint8_t FSCAL1; // Frequency synthesizer calibration. uint8_t FSCAL0; // Frequency synthesizer calibration. uint8_t FSTEST; // Frequency synthesizer calibration control uint8_t TEST2; // Various test settings. uint8_t TEST1; // Various test settings. uint8_t TEST0; // Various test settings. uint8_t IOCFG2; // GDO2 output pin configuration uint8_t IOCFG0; // GDO0 output pin configuration uint8_t PKTCTRL1; // Packet automation control. uint8_t PKTCTRL0; // Packet automation control. uint8_t ADDR; // Device address. uint8_t PKTLEN; // Packet length. uint8_t WORCTRL; } RF_SETTINGS;
const RF_SETTINGS rfSettings = { 0x08, // FSCTRL1:IF frequency of 381kHz 0x00, // FSCTRL0: 0x0C, // FREQ2 Frequency control word, high byte. 0x1D, // FREQ1 Frequency control word, middle byte. 0x89, // FREQ0 Frequency control word, low byte, RF Frequency=315MHz 0x5B, // MDMCFG4 滤波带宽 kHz 0xF8, // MDMCFG3 波特率=100bps 0x13, // MDMCFG2 30/32 sync word bits detected、GFSK调制模式、Enable digital DC blocking filter 0x22, // MDMCFG1 FEC功能禁止、4bytes preamble、2 bit exponent of channel spacing 0xF8, // MDMCFG0 channel spacing = (65536/262144)*(256+0XF8)*2^2=199.951 kHz 0x00, // CHANNR Channel number. 0x47, // DEVIATN(when FSK modulation is enabled) 0xB6, // FREND1: 0x10, // FREND0:选择PATABLE[0] 0x18, // MCSM0: sleep模式下XOSC无效; 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. 0x1F, // FSCAL0 Frequency synthesizer calibration. 0x59, // FSTEST Frequency synthesizer calibration. 0x88, // TEST2 Various test settings. 0x31, // TEST1 Various test settings. 0x0B, // TEST0 Various test settings. 0x29, // IOCFG2 GDO2 output pin configuration. 0x06, // IOCFG0:a sync word has been transmitted 、a complete packet has been transmitted 0x24, // PKTCTRL1:A threshold of 4PQT 无地址检测校验, no broadcast、APPEND_STATUS包含 0x45, // PKTCTRL0:包长不固定,由sync字节后的Packet length字节确定、CRC使能、Whitening on 0x00, // ADDR:Device address 0xFF, // PKTLEN:最大包长度为16,收到的包长度超过16则丢弃 0xFB // WORCTRL};
我没有按照DN015执行频率校正
cedar_xuesong:
回复 guangquan li:
mark
guangquan li:
回复 cedar_xuesong:
有没有可能是射频信号造成的干扰,导致晶体振荡频率变化呢?