Hi,
I'm working with uVision 5.15 and RL-USB with RTX to develop a USB CDC application. I used the function USBD_CDC_ACM_DataSend to send data over the USB com port. The application continuously (250ms step) sends a keepalive message through the USB com port to the host, the problem is that if the com port is closed after some messages the USBD_CDC_ACM_DataSend stops to work and also return 0 as byte sent, also opening the connection does not solve the problem. Someone knows how to solve this problem? Is this a RL-USB bug?
Regards
Hi Tsuneo! How can you set the control line for USBD CDC? I've asked similar questions https://community.arm.com/developer/tools-software/tools/f/keil-forum/47289/lpc1768-architecture-questions . I'm working with the VirtualCOM USBD sample for lpc1768, I can connect to the PC but can't seem to read data that I send from the MCU to the PC in C#. I can however, using teraterm. Any hints at what might be wrong?
Kev said:can't seem to read data that I send from the MCU to the PC in C#. I can however, using teraterm
Check your control signal settings - DTR, RTS ...
You could also use something like https://www.eltima.com/products/serial-port-monitor/ to see what's happening at the PC end - and where you C# differs from Teraterm ...
EDIT
I'm not affiliated with nor sponsored by Eltima - but I have used their Serial Port Monitor with success in debugging such things.
If TermTerm can read/write on the PC side, then it's probably your code rather than the VCP/CDC
Look for other examples, and try those, don't see your code so can't suggest what's wrong there. In C one typically needs to use CreateFile() and Get/SetCommState(), data can then be moved via Read/WriteFile(). If the port is truly virtual the baud rate has no real meaning/effect.
Given the age of the LPC1768 I'd have to imagine there are several VCP/CDC class examples that could be found, along with the expected set of functionality and descriptors.
Great idea man thanks keep it up all the time. am very happy to see your standard. MyAARPMedicare Login