Skip to main content
Associate
Solved

S2LP sniff mode

Hi,

I successfully configured the transceiver RX mode with RX always ON.
Now I'm trying to use Sniff mode. Basically I copied the example from S2LP DK.

 

 

 // Below the code relevant for sniff mode. Initial radio, packet and address
 // configuration is done the same for RX and TX

 S2LPGpioIrqDeInit(NULL);
 S2LPGpioIrqConfig(RX_DATA_READY, S_ENABLE);

 // this line is not from the example.
 // but without additional IRQs the S2LP ends up in the SLEEP_NO_FIFO
 S2LPGpioIrqConfig(RX_SNIFF_TIMEOUT, S_ENABLE);

 SRssiInit xSRssiInit = {
		.cRssiFlt = 14,
		.xRssiMode = RSSI_STATIC_MODE,
		.cRssiThreshdBm = -70, 
	};
	S2LPRadioRssiInit(&xSRssiInit);

	S2LPGpioIrqClearStatus();

	S2LPCmdStrobeFlushRxFifo();

	/* set the LDC mode wkup */
	S2LPTimerSetWakeUpTimerUs(1000*MIN_PERIOD_WAKEUP);

	/* set the rx timeout */
	S2LPTimerSetRxTimerUs(30000);

	/* use SLEEP_A mode (default) */
	S2LPTimerSleepB(S_DISABLE);

	/* enable LDC mode, FAST RX TERM and start Rx */
	S2LPTimerLdcrMode(S_ENABLE);

	/* enable the fast rx timer */
	S2LpTimerFastRxTermTimer(S_ENABLE);

	S2LPCmdStrobeRx();

 

 

S2LP goes into WAIT_SLEEP mode and stays there indefinitely. I get no any interrupts when trying to send packets from the second board with the correct preamble and sync word.

I even tried to enable all interrupts using `S2LPGpioIrqConfig(ALL_IRQ, S_ENABLE);`
Still no interrupts are triggered in the WAIT_SLEEP mode.

It looks like it never wakes up. Do I miss something or the example is wrong? The LDCR example looks a bit different, although it should be almost the same excluding sync stuff?

Thanks in advance

This topic has been closed for replies.
Evgeny MBest answer
Associate

ok, got it work.

It turned out that enabling interrupts other than RX_DATA_READY was a mistake

1 reply

Evgeny MAuthorBest answer
Associate

ok, got it work.

It turned out that enabling interrupts other than RX_DATA_READY was a mistake