This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USBD_CDC_ACM_DataSend no sending

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

Parents
  • 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.

Reply
  • 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.

Children