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

Odd situation with USB Communication Device (CDC )- VCP

Hi all,

I’m having an odd situation with RL-USB with the following characteristics:

STM23F407ZG (board with proven hardware)
Communication Device (CDC) – Virtual COM Port
Full Speed

CDC Config (in usb_config_FS.c):
#define USBD_CDC_ENABLE 1
#define USBD_CDC_EP_INTIN 1
#define USBD_CDC_WMAXPACKETSIZE 64
#define USBD_CDC_BINTERVAL 2
#define USBD_CDC_HS_ENABLE 0
#define USBD_CDC_HS_WMAXPACKETSIZE 16
#define USBD_CDC_HS_BINTERVAL 2
#define USBD_CDC_EP_BULKIN 2
#define USBD_CDC_EP_BULKOUT 2
#define USBD_CDC_WMAXPACKETSIZE1 64
#define USBD_CDC_HS_ENABLE1 0
#define USBD_CDC_HS_WMAXPACKETSIZE1 64
#define USBD_CDC_HS_BINTERVAL1 0
#define USBD_CDC_CIF_STRDESC L"USB_CDC"
#define USBD_CDC_DIF_STRDESC L"USB_CDC1"
#define USBD_CDC_BUFSIZE 64
#define USBD_CDC_OUTBUFSIZE 128

VCP is configured and recognized in Windows, communication work fine, but after sending a few thousand bytes (the amount varies) RL-USB just stops sending data over the USB, MCU keeps working normally and bytes are still receive over the USB interface.

After some debugging I found that “usbd_cdc_ser_availchar” is still being called, but usbd_cdc_ser_read is no longer called.

In order to isolate the problem, I made a project with only RL-USB and a very simple loop for sending and receiving bytes, and the situations remains the same, after a few thousand bytes sent RL-USB just stops calling usbd_cdc_ser_read … any ideas of what I'm doing wrong ?

Best regards,
Paulo

Parents
  • Hi,

    We have tried every situation and the problem still remains.

    The last URB to the host is the following:
    -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
    PipeHandle = 89a949cc [endpoint 0x00000082]
    TransferFlags = 00000003 (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK)
    TransferBufferLength = 00000000
    TransferBuffer = 8971b004
    TransferBufferMDL = 89cad538
    UrbLink = 00000000

    TransferBufferLength is zero, and it should be 12 as in all the previous IN URB to the host, at some point RL-USB just quits sending more data.

    We have even tried the examples supplied by Keil and the problem still occurs, it’s strange that anyone has not reported this before.

    We were really looking forward to use RL-USB, but it seems that we are at a dead end.

    Is anyone using RL-USB Communication Device (CDC) with success ?

    Best regards,
    Paulo

Reply
  • Hi,

    We have tried every situation and the problem still remains.

    The last URB to the host is the following:
    -- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
    PipeHandle = 89a949cc [endpoint 0x00000082]
    TransferFlags = 00000003 (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK)
    TransferBufferLength = 00000000
    TransferBuffer = 8971b004
    TransferBufferMDL = 89cad538
    UrbLink = 00000000

    TransferBufferLength is zero, and it should be 12 as in all the previous IN URB to the host, at some point RL-USB just quits sending more data.

    We have even tried the examples supplied by Keil and the problem still occurs, it’s strange that anyone has not reported this before.

    We were really looking forward to use RL-USB, but it seems that we are at a dead end.

    Is anyone using RL-USB Communication Device (CDC) with success ?

    Best regards,
    Paulo

Children