Good morning,
I am a freelancer and for my client I am developing an anti intrusion system.
In particular I am writing the firmware for the radio based on the CC1101 which will operate on battery power and for this reason I kindly ask for help for the management of WAKE ON RADIO.
I have already followed many discussions on the forum for this topic, but something still eludes me ...
I also found this "e2e.ti.com/.../181405 which was answered by a TI FAE named Siri who clarified many doubts about it, but even if I understand his reasoning and the settings of the registers, I NEVER receive when I am in WOR.
The CC1101 has a 26 Mhz crystal and works at 868 Mhz
When everything works, the goal is to send a packet with a 10 byte payload, but I'm currently trying to make the example taken from Siri's answer to the link above work, to send a packet like this:
Baud 1200
Preamble 24 bytes
4 byte synchronization
Payload of 4 bytes (1 byte long, 1 byte dest addr, 2 bytes of data)
2 bytes CRC
Below you can see the code I'm using ...
I ask kindness to help me because I don't know what to do anymore ...
Thanks you so much !!
CONFIGURATION:
0x07, // IOCFG2 GDO2 Output Pin Configuration 0x2E, // IOCFG1 GDO1 Output Pin Configuration 0x24, // IOCFG0 GDO0 Output Pin Configuration 0x07, // FIFOTHR RX FIFO and TX FIFO Thresholds 0x57, // SYNC1 Sync Word, High Byte 0x43, // SYNC0 Sync Word, Low Byte 0x3E, // PKTLEN Packet Length 0x46, //6E PKTCTRL1 Packet Automation Control 0x45, // PKTCTRL0 Packet Automation Control 0xFF, // ADDR Device Address 0x01, // CHANNR Channel Number 0x08, // FSCTRL1 Frequency Synthesizer Control 0x00, // FSCTRL0 Frequency Synthesizer Control 0x21, // FREQ2 Frequency Control Word, High Byte 0x62, // FREQ1 Frequency Control Word, Middle Byte 0x76, // FREQ0 Frequency Control Word, Low Byte 0xF5, // MDMCFG4 1200 BAUD Modem Configuration 0x83, // MDMCFG3 1200 BAUD Modem Configuration 0x17, // MDMCFG2 Modem Configuration 0x72, // MDMCFG1 Modem Configuration 0xF8, // MDMCFG0 Modem Configuration 0x15, // DEVIATN Modem Deviation Setting 0x07, // MCSM2 Main Radio Control State Machine Configuration 0x0C, // MCSM1 Main Radio Control State Machine Configuration 0x18, // MCSM0 Main Radio Control State Machine Configuration 0x16, // FOCCFG Frequency Offset Compensation Configuration 0x6C, // BSCFG Bit Synchronization Configuration 0x03, // AGCCTRL2 AGC Control 0x40, // AGCCTRL1 AGC Control 0x91, // AGCCTRL0 AGC Control 0x02, // WOREVT1 High Byte Event0 Timeout 0x26, // WOREVT0 Low Byte Event0 Timeout 0x78, // WORCTRL Wake On Radio Control 0x56, // FREND1 Front End RX Configuration 0x17, // FREND0 Front End TX Configuration 0xA9, // FSCAL3 Frequency Synthesizer Calibration 0x0A, // FSCAL2 Frequency Synthesizer Calibration 0x00, // FSCAL1 Frequency Synthesizer Calibration 0x11, // FSCAL0 Frequency Synthesizer Calibration 0x41, // RCCTRL1 RC Oscillator Configuration 0x00, // RCCTRL0 RC Oscillator Configuration 0x59, // FSTEST Frequency Synthesizer Calibration Control, 0x7F, // PTEST Production Test 0x3F, // AGCTEST AGC Test 0x81, // TEST2 Various Test Settings 0x3F, // TEST1 Various Test Settings 0x0B // TEST0 Various Test Settings
void C_Transceiver_CC1101::EnableWorState(void) { SetIdle(); WriteRegister(MCSM0, 0x18); WriteRegister(MCSM2, 0x18); WriteRegister(WOREVT1, 0x11); WriteRegister(WOREVT0, 0x9A); WriteRegister(WORCTRL, 0x78); DelayuS(200); WriteStrobe(SFRX); WriteStrobe(SWORRST); WriteStrobe(SWOR); }