Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ansh_2022771
Level 2
Level 2
First like received First like given

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:

  1. Disconnections are not time-based it can happen within 30 seconds, or sometimes after 5 seconds and sometimes after 30 minutes. I want to know the different parameters in the BLE component that might affect this. I have attached screenshots of my settings.
  2. I figured that CyBle_ProcessEvents() can be the culprit hence I called this function many times. Further when I try to call this function in the timer ISR for 2 ms interval then BLE communication stops working. Though the rest of the project works fine. Are there any issues with interrupt priority here?
  3. Any other issues that might have caused this irregular disconnection behavior.

ble.png

0 Likes
1 Reply
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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

0 Likes