lpcware

Problem with endpoint configuration

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by cdevelop on Wed Nov 28 02:08:01 MST 2012
Hi,

I am using nxpUSBlib now for a couple of weeks on an LPC1751. One of the problems I discoverd is that if two endpoints are configured one as IN and one as OUT (bulk) on the same logical endpoint number, only the last configured endpoint works.

The physical endpoint number is saved in the "endpointhandle" where it is saved on the logical enpoint index. So if two endpoints are configured on the same logical endpoint only the last one written is in the "endpointhandle". If you want to select an endpoint by logical number it uses the physical endpoint of the last configured endpoint.

endpointhandle[Number] = (Number==ENDPOINT_CONTROLEP) ? ENDPOINT_CONTROLEP : PhyEP;

In all example codes there is always chosen for seperated logical enpoint numbers. Now I know why.

Can someone tell me why this is done in this way?

Thanks.

Outcomes