Hello, I am compiling an application to be flashed onto a nRF52810. I am using Segger Embedded Studios and the nRF52 DK to develop the application. I want to read values from the SAADC, advertise, connect, send the data, sleep for n minutes, then read more calues, advertise, connect, send data, sleep for n minutes, etc etc repeat. I have read online that the function to disconnect from a central device within my peripheral application is to calll:
err_code = sd_ble_gap_disconnect(m_conn_handle,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
When I use this function, my program will not compile and reads: static assertion failed: "priority level unavailable".
While I do have a fair amount of experience developing simple BLE applications with Nordic products and the SDK, I have never had issues with managing priority levels or needing to change default values in the past. This is the function I am calling sd_ble_gap_disconnect from, but no matter when I make the function call my application throws the same error. Does anybody have any ideas on how I may correct this error?
void disconnect_restart_timer() { err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION); APP_ERROR_CHECK(err_code); // Create application timer err_code = app_timer_create(&m_timer_id, APP_TIMER_MODE_SINGLE_SHOT, single_shot_timer_handler); APP_ERROR_CHECK(err_code); // Start timer err_code = app_timer_start(m_timer_id, APP_TIMER_TICKS(10000), NULL); APP_ERROR_CHECK(err_code); NRF_LOG_INFO("TIMER STARTED\n"); NRF_LOG_FLUSH(); nrf_pwr_mgmt_run(); }