Hi. I have an application that works perfectly on version 0x04 parts, but on version 0x14 it constantly wakes up spuriously under certain conditions. The code is the same in both cases.
FSCTRL1: 0x06 FSCTRL0: 0x00 FREQ2: 0x23 FREQ1: 0x31 FREQ0: 0x3B MDMCFG4: 0xCA MDMCFG3: 0x83 MDMCFG2: 0x13 MDMCFG1: 0x22 MDMCFG0: 0xF8 DEVIATN: 0x35 MCSM0: 0x18 FOCCFG: 0x16 BSCFG: 0x6C AGCCTRL2: 0x43 AGCCTRL1: 0x40 AGCCTRL0: 0x91 FREND1: 0x56 FREND0: 0x10 FSCAL3: 0xE9 FSCAL2: 0x2A FSCAL1: 0x00 FSCAL0: 0x1F TEST2: 0x81 TEST1: 0x35 TEST0: 0x09
rf_write_reg(RF_IOCFG2, 0x06); // assert when sync word received rf_write_reg(RF_PKTCTRL0, 0b00000010); // infinite packet length, no whitening rf_write_reg(RF_SYNC0, CFG_radio_config_cache.wakeup_sync_word & 0xFF); rf_write_reg(RF_SYNC1, (CFG_radio_config_cache.wakeup_sync_word >> 8) & 0xFF); // 2s polling rf_write_reg(RF_WORCTRL, 0b01111001); // enable RC oscillator rf_write_reg(RF_WOREVT1, 0x08); // 2s, WOR_RES = 1 rf_write_reg(RF_WOREVT0, 0x76); rf_write_reg(RF_PKTCTRL1, 0b00000000); // PQT = 0 (since we are not sending the preamble, but rather the sync word) rf_write_reg(RF_MCSM2, 0b00000100); // RX_TIME_QUAL = 1, RX_TIME rf_strobe_reg(RF_SWOR);
The wake-up signal is just the sync word repeated over and over for two seconds.
The code seems to work okay under some circumstances and then not under others with the problematic radios. I'm trying to identify the sequence of commands that cause it to get into this state.