I want multiple virtual comm ports on USB

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

I want multiple virtual comm ports on USB

577 Views
chrispflieger
Contributor IV

It seems that depending on which family of MCU I chose, I am limited as to how many VCPs I can have.

For instance, I _think_ the LPC11U68 is limited on endpoints so just one VCP is possible. AN12458 states the LPC54018 can have two VCPs on the high speed and another two VCPs on the full speed - which sounds confusing - shouldn't ten physical endpoints support at least three VPCs? Maybe it's how they are allocated...

So, which LPC's would give me the most? Is there an easy way to determine how many VCPs I can run on a particular device?

The application is a single MCU that has several different UARTs with various proprietary protocols, so I'm trying to get the chip count down as low as possible. There's not a lot of processing, so an M0 core is adequate. I just want a single device that appears as multiple comm ports.

Labels (1)
0 Kudos
1 Reply

474 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hello Chris

To select the LPC MCU I recommend you to follow this mini-guide that I´ve made.

 Each VCP will require 3 endpoints.

 Endpoints requirements for VCPs

Physical endpoint      Endpoint Type   Direction   Packet size   ( max value in bytes)

EPn1                               bulk                      in                64 full speed / 512 high speed

EPn2                              bulk                       out             64 full speed / 512 high speed

EPn3                             interrupt                 in               16

 Take into account that the packet size of each endpoint is stored into an endpoint buffer RAM.

 

You should take into account the following considerations to calculate how many

VCP´s will support an MCU.

  •  Endpoints for a VCP shall not be control or isochronous type.
  • Each  EP will consume a certain amount of USB ram space, due to its packet size
  • take the sum of each packet size and see if it fits into ram space.
  • The packet size of an EP could be smaller than its maximum value.

 

Now take a look at these examples

This is the table of endpoints for  LCP1311, which supports only one VCP

endpoints.png

There are only 6 endpoints of interrupt or bulk type.

For another VCP the LPC1311 must have another   EP  with  in direction.  In  this case

endpoint buffer RAM was enough to cover EP buffer size.

The LPC17   Supports 32 physical (16 logical) endpoints and has a 4 kB endpoint buffer RAM. 

 

For the  LPC5400 case:

Its USB0 device controller supports 10 physical (5 logical) endpoints including two control endpoints.

Its  USB1 device controller with the specification for high speed supports 8 physical (16 logical) endpoints with up to 8 kB endpoint buffer RAM. Control, Bulk, Interrupt and Isochronous endpoints are supported.

 

I hope this information helps you, best regards.


Have a great day,
Diego

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos