OS_ERR_INV_MUTEX when using USBD_IP_Add

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • OS_ERR_INV_MUTEX when using USBD_IP_Add

    License: USBD-00528 with active support
    emUSB-Device version: V3.60.2
    OS version: V5.18.0.3

    I have USBD working with CDC-ACM and am now adding a second interface for IPoverUSB. I've copied Sample/USB/IP/IP_Config_IP_over_USB.c into my working app and per documentation not messed around with it yet (I did define IP_SUPPORT_IPV6 and USE_RTT and for the CDC-ACM work I have already modified VID/PID etc. in usbd.h).

    After adding _AddIP() to my main(), I now hit OS_ERR_INV_MUTEX calling IP_AddStateChangeHook at USB_Driver_IP_NI.c:439 when IP_AddStateChangeHook calls IP_OS_LOCK().

    I am using emnet/Sample/IP/OS/IP_OS_embOS.c which is where IP_OS_LOCK() is defined and this is about as far as my neophyte knowledge can take me here :)

    I'm using a lib version of embOS. My main() looks like:

    C Source Code

    1. int main(void) {
    2. SYS_Initialize(NULL);
    3. LED_Off();
    4. printf("\r\n%s v%d.%d.%d\r\n", PROJECT_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
    5. printf("Built on %s at %s\r\n", __DATE__, __TIME__);
    6. OS_Init();
    7. OS_InitHW();
    8. USBD_Init();
    9. USBD_SetDeviceInfo(&_DeviceInfo);
    10. USBD_EnableIAD();
    11. _AddIP();
    12. AddCDC(0);
    13. USBD_Start();
    14. OS_TASK_CREATE(&TCB_USB_Echo, "USB Echo Task", 100, Task_USB_Echo, Stack_USB_Echo);
    15. OS_Start();
    16. return ( EXIT_FAILURE );
    17. }
    Display All

    The post was edited 1 time, last by JayTT ().

  • Hi,

    as this also has been added to the SEGGER's support ticket system and the problem has been solved there, we will close this thread.
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.