用过CC1100单片机做的SRWF-1100模块的指点下,我做的程序在SPI通信上没问题但是收不到信号

用过CC1100单片机做的SRWF-1100模块的指点下,我做的程序在SPI通信上没问题但是收不到信号
不知道是否是寄存器配置问题:
//////////////////////////////////////////////////////////////////////
unsigned char const PaTabel[8]={0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0};
//功率配置
//////////////////////////////////////////////////////////////////////
//结构体变量赋值
//////////////////////////////////////////////////////////////////////
const RF_SETTINGS rfSettings = {
0x00,//FSCTRL2
0x0B,//FSCTRL1
0x00,//FSCTRL0
0x10,//FREQ2
0xA7,//FREQ1
0x62,//FREQ0
0x2D,//MDMCFG4
0x3B,//MDMCFG3
0x73,//MDMCFG2
0x22,//MDMCFG1
0xF8,//MDMCFG0
0x00,//CHANNR
0x00,//DEVIATN
0xB6,//FREND1
0x10,//FREND0
0x18,//MCSM0
0x1D,//FOCCFG
0x1C,//BSCFG
0xC7,//AGCCTRL2
0x00,//AGCCTRL1
0xB2,//AGCCTRL0
0xEA,//FSCAL3
0x0A,//FSCAL2
0x00,//FSCAL1
0x11,//FSCAL0
0x59,//FSTEST
0x88,//TEST2
0x31,//TEST1
0x0B,//TEST0
0x0B,//IOCFG2
0x06,//IOCFG0
0x04,//PKTCTRL1
0x05,//PKTCTRL0
0x00,//ADDR
0x0C,//PKTLEN
};
林秀 1年前 已收到1个回答 举报

loner 幼苗

共回答了13个问题采纳率:92.3% 举报

0x24, // IOCFG2 GDO2 output pin configuration.
0x2E, // IOCFG1 GDO1 output pin configuration
0x06, // IOCFG0 GDO0 output pin configuration
0x07, // FIFOTHR RX FIFO and TX FIFO thresholds
0xD3, // SYNC1 Sync word, high byte
0x91, // SYNC0 Sync word, low byte
0xff, // PKTLEN Packet length
0x04, // PKTCTRL1 Packet automation control
0x05, // PKTCTRL0 Packet automation control
0x00, // ADDR Device address
0x00, // CHANNR Channel number
0x06, // FSCTRL1 Frequency synthesizer control // 0x06->10Kbps; 0x08->250Kbps
0x00, // FSCTRL0 Frequency synthesizer control
0x10, // FREQ2 Frequency control word, high byte
0xA7, // FREQ1 Frequency control word, middle byte
0x62, // FREQ0 Frequency control word, low byte
0x78, // MDMCFG4 Modem configuration
0x93, // MDMCFG3 Modem configuration
0x03, // MDMCFG2 Modem configuration
0x22, // MDMCFG1 Modem configuration
0xF8, // MDMCFG0 Modem configuration
0x44, // DEVIATN Modem deviation setting
0x07, // MCSM2 Main Radio Control State Machine configuration
0x30, // MCSM1 Main Radio Control State Machine configuration
0x18, // MCSM0 Main Radio Control State Machine configuration
0x16, // FOCCFG Frequency Offset Compensation configuration
0x6C, // BSCFG Bit Synchroni zation configuration
0x43, // AGCTRL2 AGC control
0x40, // AGCTRL1 AGC control
0x91, // AGCTRL0 AGC control
0x87, // WOREVT1 High byte Event 0 timeout
0x6B, // WOREVT0 Low byte Event 0 timeout
0xF8, // WORCTRL Wake On Radio control
0x56, // FREND1 Front end RX configuration
0x10, // FREND0 Front end RX configuration
0xE9, // FSCAL3 Frequency synthesizer calibration
0x2A, // FSCAL2 Frequency synthesizer calibration
0x00, // FSCAL1 Frequency synthesizer calibration
0x11, // FSCAL0 Frequency synthesizer calibration
0x41, // RCCTRL1 RC oscillator configuration
0x00, // RCCTRL0 RC oscillator configuration
0x59, // FSTEST Frequency synthesizer calibration control
0x7F, // PTEST Production test
0x3F, // AGCTEST AGC test
0x88, // TEST2 Various test settings
0x31, // TEST1 Various test settings
0x0B, // TEST0 Various test settings
最近我也在搞CC1101,这是我的配置,已经调通了,能正常工作.要注意一点的就是,CC1101有一个片选,不知道你有没有操作正确,当片选由高变低的时候,一定要等待SO脚变低才能进行地址/数据的传输,注意它的头字节.

1年前

5
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.014 s. - webmaster@yulucn.com