-
But what does seem to help (needs more testing) is for me to pause all BLE operations ie disconnect from the IDE and also pause the BLE scans I am doing in my code.
I came across this article https://jimmywongiot.com/2019/12/15/high-speed-uart-on-nordic-nrf52-series/ that describes similar issue - when using older uart mode which does not use DMA and trigger interrupt after each character sent/received it can happen that bluetooth interrupts with higher priority can cause lost characters.
They discuss much higher baudrates there, however at 115200 sending/receiving one byte should be about 87uS (10bits/115200 ?) which is still pretty short compared to latencies mentioned in that article so it can be the issue.
Current UART code in Espruino is old and shared with nrf51 so it is probably not used in UARTE mode (=with DMA). Here I see only one character is expected when receiving https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c#L1763
With further testing I have found that I still cant get reliable transfer of 22kb from the BG96 to NRF52840 (RAK5010).
But what does seem to help (needs more testing) is for me to pause all BLE operations ie disconnect from the IDE and also pause the BLE scans I am doing in my code.
The NRF52840 has a second serial port, so I might set that up for the IDE