We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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; } }
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 !!
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.
Now it works, thank you very much !!