cc1101 2-FSK模式可以接收但是ASK模式不可以,为什么?

2019-07-18 15:34发布

tica, sans-serif">cc1101 2-FSK模式可以接收但是ASK模式不可以,为什么?
用2-FSK模式可以正常收发,下面是我2-fsk的配置//基频:432.6M FREQ2 FREQ1 FREQ0
//前导字节为2个 MDMCFG1
//better sensitivity MDMCFG2
//Data rate:110 kBaud MDMCFG4 MDMCFG3
//RX filter BW: 325 KHZ MDMCFG4 MDMCFG3
//Deviation: 47.6KHZ
//Modulation format: 2-FSK
//Channel number: 0x0f
const RF_SETTINGS rfSettings = //channel number变了
{
0x00, //FSCTRL2;
0x08, // FSCTRL1 Frequency synthesizer control.
0x00, // FSCTRL0 Frequency synthesizer control.
0x10, // FREQ2 Frequency control word, high byte.
0xA3, // FREQ1 Frequency control word, middle byte.
0x72, // FREQ0 Frequency control word, low byte.
0x5C, // MDMCFG4 Modem configuration.
0x15, // MDMCFG3 Modem configuration.
0x03, // MDMCFG2 Modem configuration.
0x02, // MDMCFG1 Modem configuration.
0xF8, // MDMCFG0 Modem configuration.
0x0f, // 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.
0x2E, // IOCFG2 GDO2 output pin configuration.
0x06, // IOCFG0 GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.
0x04, // PKTCTRL1 Packet automation control.
0x45, // PKTCTRL0 Packet automation control.
0x00, // ADDR Device address.
0xFF // PKTLEN Packet length.
};
改成ask模式后,就不能接收了,试过很多速率,带宽等的不同配置,都不能接收成功,也阅读过N022的说明文档,对 MDMCFG2和 FREND1是做过相应修改的,通过调试后发现,当调用 halSpiStrobe(CCxxx0_SRX);//进入接收状态,void halSpiStrobe(INT8U strobe)
{
CSN = 0;
while (MISO);//为低电平说明晶振开始工作
SpiTxRxByte(strobe); //写入命令
CSN = 1;
}
就卡在了while (MISO);//为低电平说明晶振开始工作不能在往下执行了,下面我列一下我的一张ask的配置const RF_SETTINGS rfSettings = //channel number变了
{
0x00, //FSCTRL2;
0x02, // FSCTRL1 Frequency synthesizer control.频率合成器控制 中频??? 04还是09 0D 怎么算???
0x00, // FSCTRL0 Frequency synthesizer control. 1

0x10, // FREQ2 Frequency control word, high byte. 1 决定基频 可以根据说明文档计算得到
0xA5, // FREQ1 Frequency control word, middle byte.
0x6A, // FREQ0 Frequency control word, low byte.???

0xf5, // MDMCFG4 Modem configuration. 调制器配置 由接收滤波器带宽和波特率共同决定
0x83, // MDMCFG3 Modem configuration.????? 调节波特率
0x33, // MDMCFG2 Modem configuration. 模式选择,是否使用曼切斯特编码,传输同步字节设置 33还是3b
0x02, // MDMCFG1 Modem configuration. 高四位决定前导码的最小位数 低四位 指数的频道间隔
0xF8, // MDMCFG0 Modem configuration. 决定通道间隔的频率,一般为200HZ

0x0A, // CHANNR Channel number. 1 通道数选择

0x15, // DEVIATN .调制器偏差设置 低位设置无效??
0X47, //FIFOTHR

0x56, // FREND1 Front end RX configuration. 前端RX配置 B6???56?? 两者选择和带宽有关
0x11, // FREND0 Front end TX configuration. 和功率寄存器有关 10 11

0x18, // MCSM0 Main Radio Control State Machine configuration. 1主要的无限状态机控制配置 默认

0x14, // FOCCFG Frequency Offset Compensation Configuration.频率偏移补偿配置 1C??14
0x6C, // BSCFG Bit synchronization Configuration. 位同步配置,和时钟有关 1C ??6c

0x04, // AGCCTRL2 AGC control. 04 ????03
0x00, // AGCCTRL1 AGC control. 00 ?????40
0x92, // AGCCTRL0 AGC control. ????
// 0xFB, // WORCTRL新增的自己
0xEA, // FSCAL3 Frequency synthesizer calibration. 频率合成器校准???? EA E9
0x2A, // FSCAL2 Frequency synthesizer calibration.
0x00, // FSCAL1 Frequency synthesizer calibration. 1
0x11, // FSCAL0 Frequency synthesizer calibration. 11 1F 22222222222

0x59, // FSTEST Frequency synthesizer calibration. 频率合成器校准控制 默认

0x81, // TEST2 Various test settings. 各种测试设置 ok 81 88 222222222
0x35, // TEST1 Various test settings. 35 31 22222222222
0x09, // TEST0 Various test settings. 1

0x2E, // IOCFG2 GDO2 output pin configuration. 高阻抗 29???
0x06, // IOCFG0 GDO0 output pin configuration. 工作在异步串行模式 ??????
0x04, // PKTCTRL1 Packet automation control. 包的自动化控制 CRC校验用 1
0x45, // PKTCTRL0 Packet automation control. 05???
0x00, // ADDR Device address. 设备地址 1
0xFF, // PKTLEN Packet length. 数据包长度
};
网上的很多关于ask配置的例子,我也试过,都不能接收,求大神们帮我看看是什么原因,自己实在分析不出来了
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。