This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE_HCI_CONNECTION_TIMEOUT issue

Hello guys,

Something strange is happening here and I need your opinion about that... I have a custom board with nRF52840-based BL654 module on it. I am using SDK15.3.0 and SoftDevice S140 v6.1.1.

Some of you already helped me to properly configure the clock for SoftDevice (link). Here is how I configured it (RC clock with 500ppm accuracy because BL654 is using on-chip 32768 RC oscillator - page 34 of this datasheet):

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
// <i>  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
// <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
// <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
// <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
// <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
// <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
// <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
// <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
// <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
// <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
// <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
// <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif

// </h> 

Everything worked great and I was able to debug my code with Bluetooth Low Energy tool of nRF Connect app through nRF52840 dongle. I did not work on the development during the last few weeks. This morning, I started my development again and I experience random and strange BLE disconnect events between my custom board and Bluetooth Low Energy tool. The reason for disconnection is BLE_HCI_CONNECTION_TIMEOUT. I was able to understand the reason of this  disconnect event from here.

However, I am quite confused what could happen during the last few weeks that is causing BLE_HCI_CONNECTION_TIMEOUT events!? Do you guys have any idea?

Did I properly configured my SoftDevice clock? Could it be that something strange happened with the on-chip RC oscillator of my BL654 module (I have two custom boards and they both behave the same)? Finally, is there somethnig wrong with the  Bluetooth Low Energy tool of nRF Connect app? I am using latest Version 2.3.1 of Bluetooth Low Energy tool and version v3.1.0 of nRF Connect app.

Thank you, guys, for your time and effort! It is really appreciated.

Sincerely,

Bojan.

Parents
  • Hi,

    Where specially are you seeing the BLE_HCI_CONNECTION_TIMEOUT ? 

    Is both the central(nRFConnect with nRF52840 dongle) and the peripheral(your custom  board) reporting this error ?

    Do you have any debug logs from your custom board? Maybe it's entering the error-handler, and being reset ?

  • Hello ,

    Thanks for your reply.

    I see this BLE_HCI_CONNECTION_TIMEOUT error inside my Bluetooth Low Energy tool:

                                                       

    While communicating with Bluetooth Low Energy tool my custom board is in Debug mode through Segger Embedded Studio. Custom board does not report any error, it just freezes ! Is there any handler function on SDK side for handling BLE_HCI_CONNECTION_TIMEOUT events?

    Sincerely,

    Bojan.

Reply
  • Hello ,

    Thanks for your reply.

    I see this BLE_HCI_CONNECTION_TIMEOUT error inside my Bluetooth Low Energy tool:

                                                       

    While communicating with Bluetooth Low Energy tool my custom board is in Debug mode through Segger Embedded Studio. Custom board does not report any error, it just freezes ! Is there any handler function on SDK side for handling BLE_HCI_CONNECTION_TIMEOUT events?

    Sincerely,

    Bojan.

Children
No Data
Related