This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USBCDC with 2378 usb bulk EP5

I use LPC2378 in MCB2300 and I test usbcdc demo with VirtualCOM function and it works well. But when I change the bulk endpoint from EP2 to EP5, this demo works failed. In LPC2378 EP2 and EP5 are for bulk data transfer.

Does anybody know why. Thank you

  • There are three parts I modify for bulk EP5:
    (1) In usbdesc.c :
    /* Endpoint, EP5 Bulk Out */ USB_ENDPOINT_DESC_SIZE, /* bLength */ USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */ USB_ENDPOINT_OUT(5), /* bEndpointAddress */ USB_ENDPOINT_TYPE_BULK, /* bmAttributes */ WBVAL(USB_CDC_BUFSIZE), /* wMaxPacketSize */ 0x00, /* bInterval: ignore for Bulk transfer */
    /* Endpoint, EP5 Bulk In */ USB_ENDPOINT_DESC_SIZE, /* bLength */ USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */ USB_ENDPOINT_IN(5), /* bEndpointAddress */ USB_ENDPOINT_TYPE_BULK, /* bmAttributes */ WBVAL(USB_CDC_BUFSIZE), /* wMaxPacketSize */ 0x00, /* bInterval: ignore for Bulk transfer */

    (2) In cdcuser.h :
    #define CDC_DEP_IN 0x85
    #define CDC_DEP_OUT 0x05

    (3) In cdcuser.c :
    void USB_EndPoint5 (DWORD event) { switch (event) { case USB_EVT_OUT: CDC_BulkOut (); /* data received from Host */ break; case USB_EVT_IN: CDC_BulkIn (); /* data expected from Host */ break; }
    }

    Does anybody know why. Thank you

  • Hello Edward Fang,

    you must also check the Endpoint Events for EP5 in file usbcfg.h
    In uVison open usbcfg.h and use Configuration Wizard to set the Endpoint 5 Events under USB Event Handlers - Endpoint Events.

    Best Regards,
    Martin Guenther

  • Sorry, Could tell me how do I "use Configuration Wizard to set the Endpoint 5 Events" ? Could do give me an example !!

    Thank you !!

  • Hello Edward Fang,

    If you open usbcfg.h in uVision you will see the Configuration Wizard Tab at the bottom left of the window. Just click on this tab. The view of the window will change to Configuration Wizard.

    Best Regards,
    Martin Guenther

  • Now it works, thank you very much !!