Hi Ms/Mr:
我在使用cc2500, 在尝试切换 Rx mode 与 Idle mode时遇到麻烦, 我的流程如下:
step 1. Pwron init: Idle after Tx / Rx, then run step 2 every 500ms
step 2. if (not Rx) {
strobe Rx: TI_CC_SPIStrobe(TI_CCxxx0_SRX)
burst read MARCSTATE reg., : 读取结果不为0x0d
} else {
strobe Idle
burst read MARCSTATE reg., : 读取结果不为0x01
}
请教在Rx <–> Idle状态间切换的正确步骤应该怎样, 如何确认状态切换成功?
谢谢
Hawk.
Viki Shi:
直接用SIDLE 即可,The SIDLE command strobe can always be used to force the radio controller to go to the IDLE state.
mrhawk mrhawk:
回复 Viki Shi:
I have already tried this, strobe idle ( = TI_CC_SPIStrobe(TI_CCxxx0_SIDLE)), then read MARCSTATE, but result is 0x07,so i just wonder :
1. how to switch between Idle and Rx mode
2. how to confirm the switchover is done
3. is there anything i missed between strobe idle and burst read MARCSTATE reg
thx & regards.
Hawk.
Viki Shi:
回复 mrhawk mrhawk:
延时一段时间再读MARCSTATE 寄存器
mrhawk mrhawk:
回复 Viki Shi:
这个想法也已经试过了,MARCSTATE reg的值很难理解,我现在的实验是:
Pwr on init后, SRX, 且Tx/Rx a pkt后RF仍然为Rx mode,
然后看能不能收到数据, 如果收到数据,读取MARCSTATE, 同时LED提示
从LED提示的现象看, 能够正确接收到数据, 故此时RF应该处于Rx mode, 但读回的MARCSTATE = 0x0
我该怎样正确了解CC2500所工作的状态?
谢谢
Viki Shi:
回复 mrhawk mrhawk:
MARCSTATE是状态寄存器,读取的时候要把burst bit 设为1
mrhawk mrhawk:
回复 Viki Shi:
我是burst read MARCSTATE