This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Communication Device Class

Part Number: TM4C123GH6PM

I need to develop a USB application for transferring data in-between PC and Microcontroller. Data can be vary from 2B to 64B in length. And it has to be transmitted at a high speed.

I think Communication Device Class is suitable for my application.

I found one example program for this - USB Serial Device. I read on the internet  that  the Communication Device Class can create virtual serial port on the PC.

Question1)  In the application program why they are using USART hardware to transmit the data?  The received data from the USB CDC are transmitted using UART in the example program (USB Serial Device).

Question2) Is UART is required to create virtual serial port  using USB CDC?

Question3) In the "tLineCoding" structure of USB CDC contain baud rate. Is  this baud rate has anything to do with USB transmit and receive speed(Interrupt IN,Bulk IN and Bulk Out speeds)?

Question4) In my application I need the maximum speed of USB 2.0. How to set it?

  • May I "applaud" your time & effort in the composition of your clear & detailed post?      Well done - especially by one (relatively) new to this forum.

    I find one weakness though - you do not justify your choice of, "USB only."      You note, "must be at high-speed" - yet do not define, "high-speed."

    And - unmentioned is the compare/contrast of (other) methods - beyond USB.       Should not the required investment of Time/Effort/Resources (demanded by the complexity of USB) enter into your, "Data Transfer Method" selection?       (is it not possible that vendor's MCU UART - driving into a commercially available (proper), "UART <-> USB Converter" - may, "Speed, Ease & Enhance" your, "Data Transfer" development?)

    At the very least - such would provide a "bench-mark" - which your "preferred" USB method must (substantially) exceed - to justify USB's significantly EXTRA,  "Time/Effort/Uncertainty!"

  • Sir,
    In my application I need to transmit incoming CAN messages (at 1Mbps) to PC as fast as possible. The message frequency is also very high.UART is slower than USB and USB packet size is more than that of UART and SPI(up to 64B in interrupt and buk transfers and more in Isochronous ).That is why I selected USB.Can you answer my questions sir?
  • jithin k joy said:
    Can you answer my questions...

    Possibly - but not likely in the way which you'd expect.

    UART (may) be slower than USB in (some, many) applications - but NOT in all!      And - this class MCU is sure to impose (some) speed burden upon your transfer.

    While you ask for (several) questions to be answered - you don't justify,  "Why the UART method - sure to be far easier - & more quickly implemented - has been rejected?"

    As stated earlier - speed alone - especially the importance of such (unknown/theoretical only) potential, "speed gains" - minus (any) "real speed measures/comparisons" remains, "uncertain & unknown" - and may not justify the time & effort before you...

    It is suspected that "commercial" CAN boards exist - which may exploit the (multiple) benefits of the (far more powerful) PC MPU - and to me this would BEST serve your interest...      (by avoiding the necessarily "choking effects" of this forum's class, MCU.)

  • Hi,
    What is your intended application? If you intend to transfer data directly between the PC and the MCU using USB then you don't need to use the Virtual COM port. The Virtual COM port is a software interface for a PC without a physical UART interface to access a USB device as if it were a built-in serial port. Let's say you still have an old peripheral that is only accessible via the UART interface. But your latest PC does not have a UART interface but you have an old program that was written to access the peripheral and you want to run on your new PC. This is when you will use the Virtual COM port. If I'm not clear then I will refer you to the below link written by Jan Axelson who provides a good introduction to Virtual COM port. It can answer many of your questions better than I can.

    janaxelson.com/usb_virtual_com_port.htm