This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Softdevice S110 V8.0.0 softdevice enable error

Hi,

I have a setup : nRF51822_QFAC Chip Rev3 Softdevice: S110 V8.0.0 SDK: V8

Code hangs at sd_softdevice_enable(). Clock Source I am using is NRF_CLOCK_LFCLKSRC_XTAL_20_PPM. If i change the clock source to NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION, i get an error 0x00007(invalid parameters) from sd_ble_gap_ppcp_set api.

Thanks

  • Hi,

    Do you have an external low frequency 32.768Hz clock? If yes, are you sure that it is running properly? If not this might be the reason why you can't get it to work with NRF_CLOCK_LFCLKSRC_XTAL_20_PPM. Do you get any error codes out of sd_softdevice_enable()?

    Can you share the code you use to initialise the sd_ble_gap_ppcp_set() parameter?

  • Hi Martin,

    I am using PCA10001 board where I have changed the nRF chip from nRF51822 QFAA to nRF51822 QFAC. PCA10001 board have 32.768KHz clock.

    Thanks

  • Are you sure the clock is running properly after you changed chip? Do you get any error codes returned from sd_softdevice_enable()?

  • Thinking that may be external low frequency 32.768KHz crystal is not working I have changed the clock setting to NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION. Here BLE uses internal RC oscillator. When i use internal RC oscillator code gets an error at sd_ble_gap_ppcp_set() .Here is the code for GAP param initilization:

    static void gap_params_init(void)
    {
        uint32_t                err_code;
        ble_gap_conn_params_t   gap_conn_params;
        ble_gap_conn_sec_mode_t sec_mode;
    
        BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
    
        err_code = sd_ble_gap_device_name_set(&sec_mode,
                                              (const uint8_t *)DEVICE_NAME,
                                              strlen(DEVICE_NAME));
        APP_ERROR_CHECK(err_code);
    
        memset(&gap_conn_params, 0, sizeof(gap_conn_params));
    
        gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
        gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
        gap_conn_params.slave_latency     = SLAVE_LATENCY;
        gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;
    
        err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
        APP_ERROR_CHECK(err_code);
    																					 
    		err_code = sd_ble_gap_tx_power_set(4);
    		APP_ERROR_CHECK(err_code);																			
    }
    
  • Are you within the GAP connection parameter limits?

    /**@brief GAP connection parameters.
     *
     * @note  When ble_conn_params_t is received in an event, both min_conn_interval and
     *        max_conn_interval will be equal to the connection interval set by the central.
     *
     * @note If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies:
     *       conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval
     *       that corresponds to the following Bluetooth Spec requirement:
     *       The Supervision_Timeout in milliseconds shall be larger than
     *       (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds.
     */
    typedef struct
    {
      uint16_t min_conn_interval;         /**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/
      uint16_t max_conn_interval;         /**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/
      uint16_t slave_latency;             /**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/
      uint16_t conn_sup_timeout;          /**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/
    } ble_gap_conn_params_t;
    
Related