The data is stored as continuous data starting at address 0 can be large (MB) and I want to stream the data as fast as possible over BLE. I am using short BLE connection intervals (8.5ms is supported by my central device) and a repeating one-shot 20ms timer which, when expired, causes a page read (256B) from flash memory and twelve 20B packets sent to the BLE stack (the remaining bytes of the 256B read are buffered until the next timer expiration). Since two connection intervals occur within 20ms, twelve packets are sent over the stack before the next timer expiration. I also have a queue to hold packets that are not sent due to NRF_ERROR_RESOURCES errors and I use BLE_GATTS_EVT_HVN_TX_COMPLETE to clear out this queue as needed. I've confirmed that there is no issue with this setup. This repeats until all data is read from flash memory.
The issue that I'm running into is that as the data is reading + streaming, eventually the QSPI driver stops issuing its callback and my flash memory read function is blocked and never continues. I tried using a flag instead of blocking, and similarly the flag also doesn't get cleared, so my "finish read" function never fires. I tried an experiment which ignores the callback uses a 1ms timer that starts when nrf_drv_qspi_read() is called. Upon expiration of the timer my "finish read" function fires normally and I continue with the process as noted above . Thus it seems to be an issue with the QSPI driver. Please advise, as soon I will move to USB MSC and need to ensure that my QSPI implementation is robust.