ERROR 7 [NRF_ERROR_INVALID_PARAM] when changing MSEC param values for MIN and MAX CONN INTERVAL

When using MSEC_TO_UNITS for min and max connectivity interval, the documentation says MSEC_TO_UNITS can take in parameter value for time between 6 to 3200,

but when I am using 6 the debugger throws <error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM]. 

#define MIN_CONN_INTERVAL MSEC_TO_UNITS(6, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.4 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(6, UNIT_1_25_MS) /**< Maximum acceptable connection interval (0.65 second). */
#define SLAVE_LATENCY 0 /**< Slave latency. */
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**< Connection supervisory timeout (4 seconds). */

Trying to get the time to be 7.5 ms, the lowest MSEC param that worked was 7.5

Parents Reply
  • Inputting 7.5 into MSEC would result in a connection interval of (7.5*1.25) = 9.375 ms.

    Here is the struct and the comment that mentions the range

    /**@brief Connection interval range structure. */
    typedef struct
    {
        uint16_t                     min_conn_interval;                   /**< Minimum connection interval, in units of 1.25 ms, range 6 to 3200 (7.5 ms to 4 s). */
        uint16_t                     max_conn_interval;                   /**< Maximum connection interval, in units of 1.25 ms, range 6 to 3200 (7.5 ms to 4 s). The value 0xFFFF indicates no specific maximum. */
    } ble_advdata_conn_int_t;
Children
Related