这些参数怎么配置才是最优啊,
波特率,频道频率什么的。
1.
CC1101_W_Config_Reg(CC1101_IOCFG2,0x01); /*接收*/
2.
CC1101_W_Config_Reg(CC1101_IOCFG1,0x2e);
3.
CC1101_W_Config_Reg(CC1101_IOCFG0,0x06); /*发送指示用*/
4.
CC1101_W_Config_Reg(CC1101_FIFOTHR,0x47); /*fifo界限*/
5.
CC1101_W_Config_Reg(CC1101_SYNC1,0xd3);
6.
CC1101_W_Config_Reg(CC1101_SYNC0,0x91);
7.
CC1101_W_Config_Reg(CC1101_PKTLEN,0x11); /*包长度*/
8.
CC1101_W_Config_Reg(CC1101_PKTCTRL1,0x05); /*地址检查 RSSI and LQI使能*/
9.
CC1101_W_Config_Reg(CC1101_PKTCTRL0,0x04); /*CRC使能,固定长度*/
10.
CC1101_W_Config_Reg(CC1101_ADDR,0xff); /*本身地址*/
11.
CC1101_W_Config_Reg(CC1101_CHANNR,0x00); /*频道*/
12.
CC1101_W_Config_Reg(CC1101_FSCTRL1,0x06);
13.
CC1101_W_Config_Reg(CC1101_FSCTRL0,0x00);
14.
15.
CC1101_W_Config_Reg(CC1101_FREQ2,0x10);
16.
CC1101_W_Config_Reg(CC1101_FREQ1,0xa7); /*载波频率*/
17.
CC1101_W_Config_Reg(CC1101_FREQ0,0x62);
18.
19.
CC1101_W_Config_Reg(CC1101_MDMCFG4,0xc9);
20.
CC1101_W_Config_Reg(CC1101_MDMCFG3,0x93); /*频道宽度速率调制模式曼彻斯特使能同步字频道间隔 */
21.
CC1101_W_Config_Reg(CC1101_MDMCFG2,0x13);
22.
CC1101_W_Config_Reg(CC1101_MDMCFG1,0x22);
23.
CC1101_W_Config_Reg(CC1101_MDMCFG0,0xf8);
24.
25.
CC1101_W_Config_Reg(CC1101_DEVIATN,0x34);
26.
CC1101_W_Config_Reg(CC1101_MCSM2,0x07);
27.
CC1101_W_Config_Reg(CC1101_MCSM1,0x3c); /*发送接收完后状态,
发送后进入空闲,*/
28.
CC1101_W_Config_Reg(CC1101_MCSM0,0x18);
29.
CC1101_W_Config_Reg(CC1101_FOCCFG,0x16);
30.
CC1101_W_Config_Reg(CC1101_BSCFG,0x6c);
31.
CC1101_W_Config_Reg(CC1101_AGCCTRL2,0x43);
32.
CC1101_W_Config_Reg(CC1101_AGCCTRL1,0x40);
33.
CC1101_W_Config_Reg(CC1101_AGCCTRL0,0x91);
34.
CC1101_W_Config_Reg(CC1101_WOREVT1,0x0a);
35.
CC1101_W_Config_Reg(CC1101_WOREVT0,0x94);
36.
CC1101_W_Config_Reg(CC1101_WORCTRL,0x31);
37.
CC1101_W_Config_Reg(CC1101_FREND1,0x56);
38.
CC1101_W_Config_Reg(CC1101_FREND0,0x10);
39.
CC1101_W_Config_Reg(CC1101_FSCAL3,0xe9);
40.
CC1101_W_Config_Reg(CC1101_FSCAL2,0x2a);
41.
CC1101_W_Config_Reg(CC1101_FSCAL1,0x00);
42.
CC1101_W_Config_Reg(CC1101_FSCAL0,0x1f);
43.
44.
45.
/**/
46.
CC1101_W_Config_Reg(CC1101_RCCTRL1,0x41);
47.
CC1101_W_Config_Reg(CC1101_RCCTRL0,0x00);
48.
CC1101_W_Config_Reg(CC1101_FSTEST,0x59);
49.
CC1101_W_Config_Reg(CC1101_PTEST,0x7f);
50.
CC1101_W_Config_Reg(CC1101_AGCTEST,0x3f);
51.
CC1101_W_Config_Reg(CC1101_TEST2,0x81);
52.
CC1101_W_Config_Reg(CC1101_TEST1,0x35);
53.
CC1101_W_Config_Reg(CC1101_TEST0,0x09);
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |