Keil Logo

How to add a serial terminal over USB?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Ian Hickey
Posted
27-Jul-2011 01:12 GMT
Toolset
ARM
New! How to add a serial terminal over USB?

My application requires a serial terminal connection from a laptop. Most laptops don't have a serial port so my idea is to emulate a serial port over a USB connection.

How does one add a USB serial port using the RL-ARM that terminates in the application - as opposed to just doing usb to serial conversion using usbd_vcom_usb2serial()?

I will be using Cortex-M3 LPC1768.

Thanks in advance.

Ian

Read-Only
Author
John Linq
Posted
27-Jul-2011 01:48 GMT
Toolset
ARM
New! RE: How to add a serial terminal over USB?

See this: code.bundle.lpc17xx.keil.usb.vcom.pdf

http://ics.nxp.com/literature/presentations/microcontrollers/pdf/code.bundle.lpc17xx.keil.usb.vcom.pdf

Read-Only
Author
Ian Hickey
Posted
27-Jul-2011 08:45 GMT
Toolset
ARM
New! RE: How to add a serial terminal over USB?

Hi, thanks for that. Yes I had already implemented the equivalent of that available from NXP's CMSIS package (and it worked well).
http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

What I was hoping to see was a RTX version using the Keil RL-ARM. There is no example of that.

The RL-ARM library only seems to have USB to serial conversion and nothing that goes from USB to an internal buffer (equivalent to adding another serial port to the processor - but over USB).

Any other thoughts besides just taking NXP's CMSIS v2.0 drivers and converting to use the RTX?

Read-Only
Author
Andrew Neil
Posted
27-Jul-2011 09:49 GMT
Toolset
None
New! RE: equivalent to adding another serial port to the processor - but over USB

So can't you just add your buffer as you would for a serial port?

Read-Only
Author
John Linq
Posted
27-Jul-2011 09:57 GMT
Toolset
ARM
New! RE: How to add a serial terminal over USB?

Are you talking about that,

You hope your USBCDC device can provide two Virtual COM Ports with one USB connection to the PC?

And you hope that you can use the RL-USB of KEIL to achieve this goal?

Read-Only
Author
Ian Hickey
Posted
28-Jul-2011 00:57 GMT
Toolset
ARM
New! RE: How to add a serial terminal over USB?

Adding one serial port is sufficient.

But Keil (in their infinite wisdom) only have converter functions (usb2serial and serial2usb) in their library. The internal buffers that receive the characters from the USB (and for transmission to the USB) are not made accessible.

Did they not consider that someone would want to use the USB connection as an additional serial port connected to a host PC (e.g., for a terminal window)?

Yes I would like to use the Keil RTX and RL-ARM to achieve this.

Read-Only
Author
John Linq
Posted
28-Jul-2011 02:02 GMT
Toolset
ARM
New! RE: How to add a serial terminal over USB?

My knowledge about USB/USBCDC is very limited. I have some experience on LPC2368/LPC1768 USBCDC development, but my USB solution is LPCUSB (an open source GPL project), not the KEIL USBCDC example, nor the RL-USB.

My understanding is, just as you have already noticed, it is impossible to use the RL-USB to create a [two Virtual COM Ports with one USB connection] device.

If you finally get a USB solution for MCU, which can create a [two Virtual COM Ports with one USB connection] device; you still need to handle the driver development on the PC side, otherwise the PC-OS will not recognize the multi-COM-ports correctly.

But if your USBCDC device can talk to the PC successfully, then the PC software should be able to specify where the data will be sent to. I mean, the PC software can tell your USBCDC device, this data is sent to MCU-Peripheral-A, that data is sent to MCU-Peripheral-B.

Read-Only
Author
Andrew Neil
Posted
28-Jul-2011 06:50 GMT
Toolset
ARM
New! RE: internal buffers are not made accessible.

But, again, can't you just add your own buffer(s) - just as you would for a serial port?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.