I'm working on implementing WOR in an existing product.
SPI communication to the CC1101 and RF RX and TX is working flawless.
When sending the SWOR strobe to the CC1101, it seems the CC1101 does not enter the WOR/SLEEP mode, although it does perform some of the actions I expect it to do when entering WOR/SLEEP mode.
My code to enter WOR mode is this:
===================
// Enter IDLE mode
cc1101CmdStrobe(CC1100_SIDLE);
cc1101CWaitState(CC1100_STATE_IDLE);
// Flush buffers
cc1101CmdStrobe(CC1100_SFRX);
cc1101CmdStrobe(CC1100_SFTX);
// Enable RC oscillator.
cc1101WriteReg(CC1100_WORCTRL, cc1101ReadReg(CC1100_WORCTRL) & 0x7f );
// Debug: GDO0 : WOR Event0 pulses
cc1101WriteReg(CC1100_IOCFG0, 0x24);
// Debug: GDO2 : CHIP_RDYn, inverted. Goes high now, then low when SWOR is strobed.
cc1101WriteReg(CC1100_IOCFG2, 0x29 | 0x40);
// Tell CC1101 to Enter WOR mode.
cc1101CmdStrobe(CC1100_SWORRST);
cc1101CmdStrobe(CC1100_SWOR);
// Debug: Verify that the CC1101 is in SLEEP/WOR mode
// Delay(100);
//cc1101WriteReg(CC1100_IOCFG2, 0x2F | 0x40); // GDO2 : HW to 0, inverted.
//cc1101WriteReg(CC1100_IOCFG2, 0x2F); // GDO2 : HW to 0.
===================
With a logic probe connected to GDO0 and GDO2, I see an expected pulse on GDO2 when executing the above code, so the crystal clock is off and we are now running on the RC oscillator. However, I never get any Event0 pulses on GDO0, so it seems we are not in SLEEP/WOR mode, or that we never wake.
If I enable the debug lines following the SWOR strobe, I do see a pulse on GDO2, which I did not expect, but which further indicates that we are not in SLEEP/WOR mode.
Am I missing something?
Shouldn't the CC1101 enter SLEEP/WOR mode, with SPI disabled, following the SWOR strobe?
Looking forward for any help or pointers.