Author Topic: Query on using a USB VCOM instead of a USB to UART Bridge  (Read 11303 times)

Prasad

  • Member
  • ***
  • Posts: 16
Query on using a USB VCOM instead of a USB to UART Bridge
« on: January 13, 2014, 02:09:16 am »
Hello,

I am working on LPC 4350 cortex M4 platform and have a specific query. Till now the earlier design was using a dedicated USB to UART bridge IC . We know that a USB can emulate a COM Port virtually and can we avoid using the Bridge IC and but use the controller's  USB and realise a virtual COM ?

what are the design considerations ithat might get affected and also the challenges involved in this? Do we need to take care of data loss in UART and also operate the bulk mode of USB spec?

Please suggest on this topic.

Thanks,

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Query on using a USB VCOM instead of a USB to UART Bridge
« Reply #1 on: January 13, 2014, 11:46:08 am »
Yes, you will need to provide firmware to support USB enumeration and communications-class communications. Some OSes have support for these built in. If you need to start from scratch, it will be a bigger job.

A USB virtual serial port has no UART to manage. It uses bulk transfers. The host software presents the device as if it had a conventional serial port.


Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Query on using a USB VCOM instead of a USB to UART Bridge
« Reply #2 on: January 13, 2014, 01:35:39 pm »
A USB comm port is a relatively easy device to implement. You mainly need a data interface with a bulk IN and a bulk out pipe. That's about enough to make Mac OS or Linux happy. To make Windows happy you also need a communications-control interface, which has an interrupt endpoint which is never used and respond to several Abstract control model requests, ours implements GET_LINE_CODING, SET_LINE_CODING and SET_CONTROL_LINE_STATE. It doesn't have to do anything with these requests, just accept them.

I'm not sure what your getting at by "take care of data loss in UART", as Jan mentioned there is no UART. You have to know what you're going to do if the data you need to send overruns. There is no guarantee that the host will read your endpoint in time. When your internal buffering is full, what happens? Our implementation just drops characters.

Prasad

  • Member
  • ***
  • Posts: 16
Re: Query on using a USB VCOM instead of a USB to UART Bridge
« Reply #3 on: January 14, 2014, 01:41:19 am »
Hello all,

thanks for the reply.

Suppose that we have both the USB to UART bridge IC on our board and we know the fact that the on-chip USB can be made to behave as a virtual COM port by firmware implementation on this platform . In this case, can we do away with the dedicated USB to UART bridge IC  from our board and manage still by the on chip USB as a virtualCOM for UART Tx/Rx purposes. What would be the disadvantages if we dont use the USB to UART bridge IC and use the on chip USB as VCOM ? can the onchip USB emulating a virtual COM still manage to handle all functionalities that the earlier USB to UART bridge IC  used to handle?

For your info, we use this USB to UART bridge IC and its associated driver on our platform to download the firmware binaries onto our devices.

Thanks in advance,
Prasad

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Query on using a USB VCOM instead of a USB to UART Bridge
« Reply #4 on: January 14, 2014, 08:00:38 pm »
I think this is still true for communications device class (CDC) virtual serial ports: even though you're using a provided driver, you need to provide an INF file containing your device's Vendor ID and Product ID (assuming Windows). For 64-bit OSes, the INF file will need to be digitally signed.

Performance/transfer speed might be better with the dedicated chip though for occasional firmware updates that's probably not a deal breaker.

http://www.lvr.com/usb_virtual_com_port.htm