|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2011-10-27 12:03:23
|
显示全部楼层
wor模式配置
void CC1100EnterWORMode()
{
// Enable automatic initial calibration of RCosc.
// Set T_event1 ~ 1.4 ms, enough for XOSC stabilize and FS calibration before RX.
// Enable RC oscillator before starting with WOR (or else it will not wake up).
Rfcc1100_WriteReg(CC1100_WORCTRL, 0x78); // Not using AUTO_SYNC function.
// Set Event0 timeout = 1 s (RX polling interval)
// WOR_RES = 0
// T_event0 = 750 / f_xosc * EVENT0 * 2^(5*WOR_RES) = 1 s,f_xosc = 27 MHz
// => EVENT0 = 0x8CA0
Rfcc1100_WriteReg(CC1100_WOREVT1, 0x8C); // High byte Event0 timeout
Rfcc1100_WriteReg(CC1100_WOREVT0, 0xA0); // Low byte Event0 timeout.
// Setting Rx_timeout =2.596 ms.
// MCSM2.RX_TIME = 000b
// => Rx_timeout = EVENT0*C(RX_TIME, WOR_RES)
Rfcc1100_WriteReg(CC1100_MCSM2, 0x00);
// Enable automatic FS calibration when going from IDLE to RX/TX/FSTXON (in between EVENT0 and EVENT1)
Rfcc1100_WriteReg(CC1100_MCSM0, 0x18);
Rfcc1100_CmdStrobe(CC1100_SWORRST);
Rfcc1100_CmdStrobe(CC1100_SWOR);
} |
|