This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1121: Smart preamble with termination on no sync

Part Number: CC1121

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

  • Hi Trevor

    I am afraid that there is no easy solution to this. Please take a look at the RX Timeout chapter in https://www.ti.com/lit/an/swra428 for an explanation.

    Since you cannot have an RX timeout, you will stay in RX as long as there is a carrier (RSSI above a threshold) and/or preamble.

    In many cases adding the preamble termination will make the system more robust as it will need a preamble with a certain signal strength to continue RX.

    In an implementation where you have a normal preamble and not a smart preamble, this can be used, as the radio will wake up somewhere within the preamble.

    When using a smart preamble, you risk that you wake up in the payload part of the timestamp packet, and then you do not want to exit, but stay in RX until you have received sync of the next timestamp packet.

    Because of this you can only have CS termination of RX, and you will need to implement some code on your MCU to monitor how long the radio has been in RX.

    Siri

  • Hi Siri,

    I figured that but was hoping I missed something Sob

    Thanks 

    Trevor