CC1101_WriteReg(CC1101_REG_MCSM0,0x18); //主通信控制状态机配置
CC1101_WriteReg(CC1101_REG_FOCCFG,0x16); //频率偏移补偿配置
CC1101_WriteReg(CC1101_REG_BSCFG,0x6c); //位同步配置
CC1101_WriteReg(CC1101_REG_AGCTRL2,0x03); //AGC控制
CC1101_WriteReg(CC1101_REG_AGCTRL1,0x40); //AGC控制
CC1101_WriteReg(CC1101_REG_AGCTRL0,0x91); //AGC控制
CC1101_WriteReg(CC1101_REG_WOREVT1,0x87); //高字节时间0暂停
CC1101_WriteReg(CC1101_REG_WOREVT0,0x6b); //低字节时间0暂停
CC1101_WriteReg(CC1101_REG_WORCTRL,0xfb); //电磁波激活控制
CC1101_WriteReg(CC1101_REG_FREND1,0x56); //前末端RX配置
CC1101_WriteReg(CC1101_REG_FREND0,0x10); //前末端TX配置
CC1101_WriteReg(CC1101_REG_FSCAL3,0xe9); //频率合成器校准
CC1101_WriteReg(CC1101_REG_FSCAL2,0x2a); //频率合成器校准
CC1101_WriteReg(CC1101_REG_FSCAL1,0x00); //频率合成器校准
CC1101_WriteReg(CC1101_REG_FSCAL0,0x1f); //频率合成器校准
CC1101_WriteReg(CC1101_REG_RCCTRL1,0x41); //RC振荡器配置
CC1101_WriteReg(CC1101_REG_RCCTRL0,0x00); //RC振荡器配置
CC1101_WriteReg(CC1101_REG_FSTEST,0x59); //频率合成器校准控制
//10DB
//CC1101_WriteReg(CC1101_REG_PATABLE0,0xc0);
//CC1101_WriteReg(CC1101_REG_PATABLE1,0xc0);
/*CC1101_WriteReg(CC1101_REG_PATABLE2,0xc0);
CC1101_WriteReg(CC1101_REG_PATABLE3,0xc0);
CC1101_WriteReg(CC1101_REG_PATABLE4,0xc0);
CC1101_WriteReg(CC1101_REG_PATABLE5,0xc0);
CC1101_WriteReg(CC1101_REG_PATABLE6,0xc0);
CC1101_WriteReg(CC1101_REG_PATABLE7,0xc0); */
Delay_MS(10);
}
/*************************************************************************************************************************
* 函数 : void CC1101_WriteTxFIFO(u8 *pBuff,u8 len)
* 功能 : 写入数据到发送缓冲区
* 参数 : pBuff:需要写入的数据缓冲区指针,len:需要写入的数据长度
* 返回 : 无
* 依赖 : 底层宏定义
* 作者 : [email protected]
* 时间 : 2014-01-01
* 最后修改时间 : 2014-01-01
* 说明 : 写入数据到发送FIFO
*************************************************************************************************************************/
void CC1101_WriteTxFIFO(u8 *pBuff,u8 len)
{ u16 i; (责任编辑:admin) |