Hi everyone!
I am developing device based on nrf25833 mcu which should transmit data to android devices using ble characteristic notification mechanism (data received by SPI, also USB interface exist but does not used simultaniously with BLE).
I am developing firmware using nRF5_SDK_17.1.0 with s113_nrf52_7.2.0_softdevice.
Packets of 186 bytes size are generated every 3 ms and transmitted by sd_ble_gatts_hvx function
NRF_SDH_BLE_GATT_MAX_MTU_SIZE set to 189, NRF_SDH_BLE_GAP_DATA_LENGTH set to 193
Transmission is stable if I use phone as reciever.
But with another device - tablet - up to half of all packets are lost. It does not matter which PHY is used. (Theoretical throughput is enough with 1M PHY)
Connection interval during transmission is set to 9-12(*1.25ms) which too seems to be enough.
I tried to change clock source XTAL|SYNTH and tried every NRF_SDH_CLOCK_LF_ACCURACY possible value - in case if this is clock stability issue - no effect.
The only obvious difference is that phone uses 5.3 bluetooth and tablet 5.0.
Can this matter?
Here is Intriguing detail.
If debugger is connected by SWD interface (by three wires: SWCLK, SWDIO, GND) , than transmission is stable and almost perfect. But if i disconnect debugger packets start to lost.
When i reconnect debugger transmission recovers. And i see in logs that notification queue was full, that probably means that without debugger packets are not send with desired speed.
With phone there is no such problem at all.
My experiments show that there is no need to attach debugger through IDE. Just connection with JLink Commander for example is enough for this magic to work.
Can anyone help and explain why is this happening?
Any ideas how to solve this issue?
Thanks in advance