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
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.
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.
But, again, can't you just add your own buffer(s) - just as you would for a serial port?