Conflict between app_usbd_init(&usbd_config) and app_error_check ().

https://devzone.nordicsemi.com/f/nordic-q-a/69596/device-initialization-problems/285611#285611

had gone through above thread.

I am struck exactly at this point.

i am trying to combine USBD and USBD_Audio wth nrf52840 DK, SDK 17.1.0.

/* USB work starts right here */
ret = nrf_drv_usbd_init(usbd_event_handler);
APP_ERROR_CHECK(ret);

NRF_LOG_INFO("USBD audio example started.");

ret = app_usbd_init(&usbd_config);

APP_ERROR_CHECK(ret);

when execution comes to app_usbd_init(&usbd_config) it goes to app_error_check () loop infinitely.

now, how to merge these two events under one usbd _initialization.

looking forward for your suggestion.

Thank you

Deep

Parents
  • Hi,

    The app_usbd library does not support co-existence with other users of nrf_drv_usbd. If you want to use these together, you need to rewrite the app_usbd library to pass the event handler from nrf_drv_usbd_init to the library and remove the call to nrf_drv_usbd_init in app_usbd_init. You then need to pass along relevant events from nrf_drv_usbd event handler to the library in your own application (e.g. call the event handler internally in app_usbd from nrf_drv_usbd_init in your application with all events).

    I'm not aware of any examples that is showing how to do this.

    Best regards,
    Jørgen

Reply
  • Hi,

    The app_usbd library does not support co-existence with other users of nrf_drv_usbd. If you want to use these together, you need to rewrite the app_usbd library to pass the event handler from nrf_drv_usbd_init to the library and remove the call to nrf_drv_usbd_init in app_usbd_init. You then need to pass along relevant events from nrf_drv_usbd event handler to the library in your own application (e.g. call the event handler internally in app_usbd from nrf_drv_usbd_init in your application with all events).

    I'm not aware of any examples that is showing how to do this.

    Best regards,
    Jørgen

Children
Related