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

NRF52840 data communication issue with 20 msec delay

Dear Friends,

I am transmitting a command of 14 bytes of data from ble_central to ble_peripheral. The ble_peripheral will recieve the command and transmits the response 400 bytes of data to ble_central. The time delay for each command from ble_central is 20 milli seconds. We are facing a problem with 20 milliseconds time delay , the ble peripheral  is only receiving the command but not responding....

It is only working fine with above 300 milliseconds delay between command and response.

I am using the ble_central and ble_peripheral code .

I would request Nordic to look into it and help us to resolve the issue...

Thanks & Regards,

Jagadeesh.

Parents
  • Hello,

    What is the connection parameters here? What is the interval and slave latency?

    What LFCLK source is used and what is the tolerance of the LFCLK when init the softdevice?

    An on-air sniffer trace may be useful. I recommend to try to set slave latency = 0 and tolerance to 500ppm for test to see if that improve the situation.

    Best regards,
    Kenneth

  • Hi kenneth,

    Master is connected through USB(UART to USB) and slave is connected through RS485(UART to RS485) .

    #define APP_ADV_INTERVAL                32  

    #define SLAVE_LATENCY                   0 

    #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 7
    #endif

    Best regards,

    jagadeesh

  • hello kenneth,

    i have tried to change the tolerance to 500 ppm. But still i am facing the same issue.

    Regards,

    jagadeesh

Reply Children
Related