Skip to main content
AndyR1
Senior
March 15, 2021
Solved

S2-LP packet loss and DMA Rx infinite loop

  • March 15, 2021
  • 3 replies
  • 830 views

Hello,

I use two X-NUCLEO-S2868A2 board with blueNRG-2 with BlueNRG-1_2 DK 3.2.1 and S2-LP_DK_1.3.2

I use following RF configuration :

#define MODULATION_SELECT MOD_2GFSK_BT1
#define DATARATE 50000
#define FREQ_DEVIATION 25000
#define BANDWIDTH 100000
#define POWER_DBM 14
 SRssiInit xSRssiInit = {
 .cRssiFlt = 14,
 .xRssiMode = RSSI_STATIC_MODE,
 .cRssiThreshdBm = RSSI_THR,
 };
 S2LPRadioRssiInit(&xSRssiInit);
 S2LPRadioCsBlanking(S_ENABLE);
  1. RSSI_THR is -100 when I wait for a packet. I configured a s2lp gpio to change with Rx and Tx state : S2LP_GPIO_DIG_OUT_TX_RX_MODE = 0x90 in S2LP_Gpio.h. My issue is that i lose some packets. As you can see in the following screenshot, the sensor enter Rx state before gateway sends its ack. I use the antenna provided with the eval board, and the two boards are very close, few cm. Is it common to lost few packets considering this range ? or am i missing some parameters or functionnalities provided by s2lp ?

0693W000008wyDrQAI.png 

2 : Sometimes the app stuck in SpiRawTransaction() in S2LP_CORE_SPI.c :

 while(!DMA_GetFlagStatus(DMA_CH_SPI_TX_IT_TC));
 DMA_ClearFlag(DMA_CH_SPI_TX_IT_TC);
 
 while(!DMA_GetFlagStatus(DMA_CH_SPI_RX_IT_TC));
 DMA_ClearFlag(DMA_CH_SPI_RX_IT_TC);

It stucks only in the DMA_CH_SPI_RX_IT_TC while()

Should I use a timeout and try to redo or change the function to polling/IT spi like in peripheral navigator example or am i missing something ?

Thanks,

Andy.

This topic has been closed for replies.
Best answer by AndyR1

With datarate 20k, freq deviation 40k, BW 102k, rssi filter gain = 14, carrier sense mode : RSSI_STATIC_MODE. the preamble pair was set to 0011 by default, so i changed it to 01. I achieved 163m in free field with 100% received packet and -90 RSSI. It should be enough for my project. I had same results with two cc1310. In AN5528, Figure 15. RSSI vs. distance (868 MHz), they have -90 dBm after 500m, is the sand good ?

3 replies

AndyR1
AndyR1Author
Senior
March 17, 2021

For 1. Replace RSSI_STATIC_MODE by RSSI_DYNAMIC_18DB_STEP_MODE seems to help but still packet loss.

Section 5.5.8.2 from https://www.st.com/resource/en/datasheet/s2-lp.pdf

"the carrier sense signal is asserted if the signal is above the threshold and a fast power increase of 6, 12 or 18 dB is detected". Is AGC could help ?

AndyR1
AndyR1Author
Senior
March 25, 2021

No packet loss using these settings

#define DATARATE 20000
#define FREQ_DEVIATION 40000
#define BANDWIDTH 102000

but Im stuck to 100 meters approx :( , increase frequency deviation should increase range : https://www.silabs.com/community/wireless/proprietary/knowledge-base.entry.html/2015/06/09/data_rate_deviation-Cfz7 is it common to have only 100m with 20kbps ?

AndyR1
AndyR1AuthorBest answer
Senior
March 30, 2021

With datarate 20k, freq deviation 40k, BW 102k, rssi filter gain = 14, carrier sense mode : RSSI_STATIC_MODE. the preamble pair was set to 0011 by default, so i changed it to 01. I achieved 163m in free field with 100% received packet and -90 RSSI. It should be enough for my project. I had same results with two cc1310. In AN5528, Figure 15. RSSI vs. distance (868 MHz), they have -90 dBm after 500m, is the sand good ?