We have been using PSOC4200 BLE chips for more than 2 years. Communication etc works perfectly fine but sometimes the phones disconnect at irregular times.
Question:
Hi,
Yes. Interrupt priority may be the cause. Please ensure that the interrupt priority of BLE should be higher than the Timer interrupt priority.
For the present setting, you can call the CyBle_Processevents() for every 20 milli seconds.
Coming to your query, to debug the reason for BLE disconnection, please check the event parameter that returns with this event "CYBLE_EVT_GAP_DEVICE_DISCONNECTED"
which is basically "CYBLE_HCI_ERROR_T" ans see what is the reason for disconnection.
Also please increase the slave latency to 1 and see if there is any improvement. Presently it is '0'.
Thanks
Ganesh