Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

connection problem with nrf52832

Hi,

I tried, ble_blinky example on DK, it works well. Also advertising interval 40ms on nrfconnect mobile app,this is consistent with SDK. 

Now, i try same example with custom board( i'm sure custom board work properly), nrfconnect app shows adevertising interval as 400ms, this is false, another bad news, the connection never be successful. 

My antenna design is not perfect,i know. It is seen by nrf connect app RSSI value. What is the reason of bonding or connection problem. Connection logs,say 0x85 gatt arror also. 

Best Regards

Berker 

  • Hi,

    I want to give more detail, explain again. I'm still haven't any solution. 

    I use blee_app_blinky example to test my custom board. This example works in DK as expected. 

    #define APP_ADV_INTERVAL                64 

    This coressponds 40ms advertisiment. In the mobile side, i can see 40ms on nRF connect app,if i use DK. 

    But, with same example and custom board, i see this interval as about 700-800ms. I don't understand this. 

    Also, app doesn't work beacuse of connection not bonded and connection is not established . 

    Best Regards 

  • Hi,

    What RSSI value did you measure on the custom board?

    What clock source are you using for the SoftDevice?

    Could you try this configuration for the LF clock source: (from sdk_config.h)

    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #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

  • Hi Sigurd,

    thanks for this useful reply. 

    Adv interval fixed  now and 40ms as expected. Also connection established most of the time and i can blink led. 

    The problem is related with my 32MHz oscillator? Or what? 

    What RSSI value did you measure on the custom board?

    RSSI is not good, -70,80dBm in about 20-30cm distance. Is this related my antenna and board design,is it true?

    And sometimes connection not bonded, the reason of this RSSI? or about your reply? 

    Thanks

  • The problem is related with my 32MHz oscillator? Or what? 

    If changing the value of NRF_SDH_CLOCK_LF_SRC from 1 to 0 worked, then this indicates an issue with the external 32.768 kHz crystal. It could be caused by wrong values of the load capacitors(C11/C12), bad soldering and/or incorrect value of the specified clock accuracy.

    And sometimes connection not bonded, the reason of this RSSI? or about your reply? 

    This could also be caused by issues with the 32.768 kHz crystal.

    If you want us to review your custom board design, I would recommend that you create a new case, where you upload the PCB layout/gerber files and schematic, and we can maybe help with some improvements to the design.

  • I didn't insert 32.768kHz crystal on custom pcb. As i know, that for RTC. I only insert 32MHz crystal through XC1/XC2 pins. 32.768kHz pins P0/P1 used for another purpose on custom pcb. Is there a wrong thing? 

Related