S2-LP packet loss and DMA Rx infinite loop
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);- 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 ?
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.
