Hi there, I hope somone can help point me in the right direction with an issue I am having..
In my application I have a TX'er that TXs 1106Bytes using infinite TX mode, This TX is actually made up of multiple small packets (like the smart preamble example)..
I also have a battery powered Rx'er that uses EWOR sniff mode to detect this transmission.. This all works OK.. I can TX and RX correctly..
My issue is that during testing I activated a static carrier (on another piece of equipment) and noticed that the RX'er stays in RX mode while the carrier is active..
this is unacceptable as the batteries will run down very quickly..
Is there any way to automatically shut down the Rx'er if no sync is detected after a finite period of time in EWOR sniff mode?
Here is my EWOR sniff mode config function
@brief @param[in] @return */ void rf_radio_ewor_enable(void) { uint8_t reg; rf_radio_idle(); // PKT_CRC_OK (Inverted), Asserted when good packet Rx'd (passed CRC check), deasserted on entry to RX rf_spi_write_reg(CC112X_IOCFG0, 0x53); // Set Sync word Byte 1 & 0 // Sync Word Detection Configuration Reg1, 16 bits [SYNC15_8: SYNC7_0], SYNC_NUM_ERROR = 11b [Bit error qualifier disabled. No check on bit errors] rf_spi_write_reg(CC112X_SYNC1, 0xB3); rf_spi_write_reg(CC112X_SYNC0, 0x0D); rf_spi_write_reg(CC112X_SYNC_CFG0, 0x0B); // Carrier Sense Threshold Configuration, Threshold = -100DBM // Automatic Gain Control Configuration Reg3, RSSI threshold is 3 dB // Automatic Gain Control Configuration Reg1, 8 sample AGC integration window, Wait time between AGC gain adjustments = 24 samples rf_spi_write_reg(CC112X_AGC_CS_THR, 0x02); rf_spi_write_reg(CC112X_AGC_CFG3, 0x11); rf_spi_write_reg(CC112X_AGC_CFG1, 0xA0); // eWOR Configuration Reg0, Event 2 timeout disabled, RCOSC calibration disabled, RCOSC is running // eWOR Event 0 Configuration MSB. event 0 timeout, Tevent0 = 441.7582418 mSecs (assumes only 1106bits TX'd for margin) // eWOR Event 0 Configuration LSB. event 0 timeout, Tevent0 = 441.7582418 mSecs (assumes only 1106bits TX'd for margin) rf_spi_write_reg(CC112X_WOR_CFG0, 0x20); rf_spi_write_reg(CC112X_WOR_EVENT0_MSB, 0x37); rf_spi_write_reg(CC112X_WOR_EVENT0_LSB, 0x38); // RFEND Configuration Reg1, Continue RX mode on RX timeout if sync word is found // RFEND Configuration Reg0, Terminate on bad packet enabled, RX termination based on CS is enabled rf_spi_write_reg(CC112X_RFEND_CFG1, 0x0E); rf_spi_write_reg(CC112X_RFEND_CFG0, 0x09); // Packet Length Configuration, max length = 125 rf_spi_write_reg(CC112X_PKT_LEN, 0x7D); // Crystal Oscillator Configuration2, The XOSC will be turned off if the SXOFF, SPWD, or SWOR command strobes are issued rf_spi_write_reg(CC112X_XOSC2, 0x00); // calibrate internal 32khz OSC // enable RC calibration reg = rf_spi_read_reg(CC112X_WOR_CFG0); // Enable ROSC calibration reg &= ~RF_RCOSC_CALIBRATE_MASK; reg |= RF_RCOSC_CALIBRATE_ENABLED; rf_spi_write_reg(CC112X_WOR_CFG0, reg); // must strobe idle to calibrate rf_radio_strobe_idle_and_wait(); // disable RC calibration, // NB must issue the SWOR as next strobe command after disabling calibration reg &= ~RF_RCOSC_CALIBRATE_MASK; rf_spi_write_reg(CC112X_WOR_CFG0, reg); // Enable RX Sniff Mode rf_spi_command_strobe(SWOR); // enable GDO0 interrupt hal_radio_irq_clear(); hal_radio_irq_enable(); g_radio.ewor_enabled = true; g_radio.event_mask = false; }
Regards
Trevor