hi ,when develop the usb + gzll+ble hid funcation, i find that it will occur a erro when stop the ble stack in the project that have usb funcation,so i try in the project :
nordic sdk\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\usbd_ble_uart like tis
// USB CODE END
/** @brief Application main function. */
int main(void)
{
ret_code_t ret;
static const app_usbd_config_t usbd_config = {
.ev_state_proc = usbd_user_ev_handler
};
// Initialize.
log_init();
timers_init();
buttons_leds_init();
app_usbd_serial_num_generate();
ret = nrf_drv_clock_init();
APP_ERROR_CHECK(ret);
NRF_LOG_INFO("USBD BLE UART example started.");
ret = app_usbd_init(&usbd_config);
APP_ERROR_CHECK(ret);
app_usbd_class_inst_t const * class_cdc_acm = app_usbd_cdc_acm_class_inst_get(&m_app_cdc_acm);
ret = app_usbd_class_append(class_cdc_acm);
APP_ERROR_CHECK(ret);
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
// Start execution.
advertising_start();
//try to stop the stack
uint32_t err_code;
err_code = ble_conn_params_stop();
NRF_LOG_INFO("err_code =%d",err_code);
APP_ERROR_CHECK(err_code);
err_code = nrf_sdh_disable_request();
APP_ERROR_CHECK(err_code);
ASSERT(!nrf_sdh_is_enabled());
ret = app_usbd_power_events_enable();
APP_ERROR_CHECK(ret);
// Enter main loop.
for (;;)
{
while (app_usbd_event_queue_process())
{
/* Nothing to do */
}
idle_state_handle();
}
}
the log also show :Fatal error
my board is pca10056,the sdk is nRF5_SDK_16.0.0_98a08e2
so i need your teams help,how can i slove this problem,or it is impossible stop the ble stack in the usb project