Part Number: CCSTUDIO
Tool/software: Code Composer Studio
Hi there,
I'm using a USB CDC communication between a C5517 target and a host PC.
I developed my application using CSL examples, modifying the source code from the "CSL_USB_CdcExample_Out".
Due to hardware limitation I need to use a Full-Speed USB configuration.
Everthing seems to work fine: enumeration, virtual COM configuration, data tx/rx are correctly transmitted from the C5517 target and visualized on a TeraTerm terminal host side.
As a test, I send a 64 bytes long packet (fixed size and fixed ASCII-printable payload).
I started sending this 64bytes long packet with a low period (1 packet/second) and everthing works fine: I see on the TeraTerm terminal the packet corrrectly printed and it keeps working great till the rate is low (100 packets/second).
There is a critical rate that let the trasmission stop: if I send a 64bytes packet @ 600Hz (307200bit/sec, way below the 12Mbit/sec Fullspeed limit) I'm only able to see the first 64 packets, then the communicatin stop. Using an USB monitor I'm able to see that 65 packets correctly sent but then a 128bytes packet is sent and the communication stops. Here is a log:
After the error occurs, no packets are sent even if the software is running (even with the usb monitor no packets are captured).
In this condition the PERI_TXCSR has the following bit asserted: FIFONOTEMPY,UNDERRUN,TXPKTRDY
This happen systematically.
If send a 18bytes long packet at the same rate, still the communication stops after a first moment of working communication.
Other details:
SYSCLK: 175MHz
CSL library: 3.04
CCS5
/** Buffer Size */
#define CSL_USB_CDC_DATA_BUF_SIZE 512
static Uint16 usbDataBufferRx[CSL_USB_CDC_DATA_BUF_SIZE];
static Uint16 usbDataBufferTx[CSL_USB_CDC_DATA_BUF_SIZE];
static Uint16 usbDataBufferTxWork[CSL_USB_CDC_DATA_BUF_SIZE/2];
static Uint16 usbDataBufferRxWork[CSL_USB_CDC_DATA_BUF_SIZE/2];
For the described test the application only send the Usb packets, nothing else is done and "CDC_putData" CSL function is used.
Do I need to control UNDERRUN/FIFONOTEMPY bits?
Why is this happening even if I'm way below 12Mbit/sec?
Thank you
Regards
Stefano