S2-LP - PQI stops RX timer at wrong channel
Greetings,
I'm working on a project where S2-LP scans multiple channels and receives a packet when a valid preamble is detected. For dwell time timing I'm using the RX timer. The timer is set to 2 milliseconds and is stopped whenever a valid preamble over certain signal level is detected to allow packet reception. Whenever the timer expires or a valid packet is received the next channel is selected (cycles from 1 to 10, then the cycle repeats)
if(chSwitch)
{
chSwitch = false;
newChan = S2LPRadioGetChannel() + 1;
if(newChan > 10)
newChan = 1;
subGHzSetChannel(newChan);
}chSwitch flag is set in interrupt handler whenever the RX timer expires, or a valid packet is received.
Channel switching function:
void subGHzSetChannel(uint8_t chNum)
{
S2LPCmdStrobeCommand(CMD_SABORT);
S2LPRadioSetChannel(chNum);
S2LPCmdStrobeCommand(CMD_RX);
}
Radio settings:
- Base frequency: 915.5 MHz
- Data rate: 10 kb/s
- Frequency deviation: 20 kHz
- Channel filter: 65 kHz
- Channel spacing: 250 kHz
- Modulation: 2-GFSK1
- RX timer stop condition: CS AND PQI
- PQI threshold = 4 transition (PQI_TH = 1)
- RSSI threshold: -90 dBm
The receiver is a custom board. For transmitter I'm using STEVAL-FKI868V2.
The test: The receiver cycles through RX channels as described above. Transmitter transmits the following packet (transmit time = 51.2 ms) on channel 5 every 100 ms:

The preamble length is set to cover dwell time of all ten channels + 1 dwell time + channel switching time.
The problem is that the timer is occasionally stopped at adjacent channels 3, 4, 6 and 7.
What happens then:
- The timer doesn't expire
- No valid packet is detected
- The application is stuck until I set chSwitch flag manually o by a separate timeout
- When I read LINK_QUALIF2 register (QPI value), it's indeed above QPI_TH.
I also tested transmission on different channels; the timer is always stopped at -2/+2 adjacent channels to the TX channel. The problem goes away when I increase PQI_TH value, but ideally, I don't want PQI_TH higher than 1, because it forces longer dwell time and longer preamble which affects the transmitter power consumption. Also, increasing PQI_TH feels like walkaround, because why would preamble be detected (RX timer stopped) on a wrong channel in the first place?
My question is, what would cause such a behavior and how to solve the issue? Has anyone encountered a similar behavior?
Thanks,
Marcin
