USB stack composite device 6 cdc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB stack composite device 6 cdc

503 Views
andoniiba1
Contributor II


I am using a TWR - K65F180M board. I amtrying to implement a usb composite device with 6 cdc usuing the usb stack included in the KSDK 1.3.0. I was able to configure the stack to use 5 CDC but when I add the 6th the PC does not enumerate any of the COMs. Can some one help me?

Labels (1)
Tags (1)
3 Replies

396 Views
isaacavila
NXP Employee
NXP Employee

Hello Andoni,

Every CDC interface does use 3 endpoints (One IN Interrupt endpoint, One IN Bulk Endpoint and One OUT Bulk Endpoint, 3 in Total) each, so, if you are using 3 different endpoints for every interface, then you have used 15 endpoints for first 5 CDCs. Once you want to add a new one, then you do not have enough endpoints for next CDC interface.

So you are probably using all available endpoints. Could you please confirm this?

I hope this can help you!

Best Regards,

Isaac

396 Views
andoniiba1
Contributor II

Hello Isaac,

You are correct I am using 3 endpoints per CDC, but I modified the following macros:

#define KHCI_MAX_ENDPOINT 19  (originally 16)

#define USBCFG_DEV_MAX_ENDPOINTS  19   (originally 16)

#define MAX_DEVICE_SERVICE_NUMBER     19    (originally 16)

Is there a limitation of 16 endpoints in the usb stack?

Best Regards,

Andoni

0 Kudos

396 Views
isaacavila
NXP Employee
NXP Employee

Hello Andoni,

You cannot use more than 16 endpoints, USB uses only 16 endpoints (bidirectional) so you cannot extend this value to a higher value. You will need to use the bidirectional feature (use for example, endpoint 1 OUT and endpoint 1 IN for one CDC device) for each endpoint in order to have enough endpoints for all 6 CDC devices:

Endpoints.jpg

I hope this helps!

Regards,

Isaac