I'm trying to transmit audio data between two nRF5340DKs. These boards share timestamp information via the wireless time synchronization method here: https://github.com/nordic-auko/nRF5-ble-timesync-demo. This code uses then radio peripheral directly contains some time-critical operations and has some high-priority routines. It exists on the netcore and coexists with the bluetooth controller. I just extended the hci_ipc source code with my own custom IPC service to control this timesync code from the appcore.
My program is correctly able to transmit both audio data as well as timestamp information between the two devices for a while. After a minute or so, the bluetooth HCI raises an error, and the bluetooth transmissions stop. The specific error thrown isn't always the same. Most commonly, it is:
<err> bt_hci_core: evt num_handles (=212) too large (849 > 5)
Sometimes, this error is accompanied by:
<wrn> bt_hci_core: Unexpected HOST_NUM_COMPLETED_PACKETS (status 0x12)
Do you have any advice on how to debug this?