This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USBD with FreeRTOS not work

Without FreeRTOS usbd working normaly with config:

#define NRF_SDH_DISPATCH_MODEL 0
#define APP_SCHEDULER_ENABLED 1

But with FreeRTOS need use

#define NRF_SDH_DISPATCH_MODEL 2

else it has errror

Error[Li006]: duplicate definitions for "SWI2_EGU2_IRQHandler"

How to solve this problem? What methods of USB need polling for working with FreeRTOS?

I'm use SDK15 and S140 v.6.0.0 Production

Parents
  • Error[Li006]: duplicate definitions for "SWI2_EGU2_IRQHandler"
    How to solve this problem? What methods of USB need polling for working with FreeRTOS?

    This is not a problem. See the description of NRF_SDH_DISPATCH_MODEL_POOLING:

    /**@brief   SoftDevice events are polled manually using @ref nrf_sdh_evts_poll().
     *
     * @note    In this mode, a user application can also implement SD_EVT_IRQHandler() to receive a
     *          notification about incoming events.
     */
     #define NRF_SDH_DISPATCH_MODEL_POLLING    2

    This is not an USB requirement - it is an SDH implementation in FreeRTOS. This configuration is required for SDH module to remove interrupt implementation. It means that after that you may use pool to check the SD status or you may implement your own interrupt implementation. This is something that is done inside nrf_sdh_freertos.c.

    We are going to provide an example with SoftDevice, together with USBD and working using FreeRTOS.

  • Do I understand correctly that I should initialize everything in the same way as in individual examples, but in the same project?
    Do I need to call the app_usbd_event_queue_process () function?
    The application falls into error when you call this function

    Can you give a piece of sample code? Only main.c file

Reply Children
No Data
Related