After much searching this site for a solution I'm at a point were I decided it necessary for me to ask directly.
SDK16.0, S132, windows 10 / SES, nrf52DK
I'm able to connect my device to nRF Connect fine and can view advertised values. However, I get an app_timer_stop assert error when disconnecting from nRF Connect. I was able to locate what may be the issue by going back through the call stack. What I found was, in the function:
static void on_disconnect(ble_evt_t const * p_ble_evt) // locarted in ble_conn_param.c
{
ret_code_t err_code;
uint16_t conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
ble_conn_params_instance_t * p_instance = instance_get(conn_handle);
if (p_instance != NULL)
{
// Stop timer if running
err_code = app_timer_stop(p_instance->timer_id);
if (err_code != NRF_SUCCESS)
{
send_error_evt(err_code);
}
}
ret_code_t app_timer_stop(app_timer_t * p_timer)
{
ASSERT(p_timer); // p_timer = 0
..
}
p_instance->timer_id is 0, thus the following assert.
conn_handle is 0 --> valid (0) in my case
I followed along in the Blood measure sample and see that the timer is valid (not 0) and it works just fine and conn_handle is 0 on a disconnect.
I assume I'm either failing to setup another parameter or it is being reset somehow. Or, I'm barking up the wrong tree.
other timers appear to be working fine.
Thank you in advance for your thoughts, suggestions or requests for additional information.
Peter