AnsweredAssumed Answered

USB CDC -- zero length packets

Question asked by brown.geoffrey.001 on May 25, 2016
Latest reply on Jun 2, 2016 by brown.geoffrey.001
I used stm32cubeMX to generate a CDC project for the stm32f3 discovery board.  After much fussing, I have a pretty stable echo going.  If I use a program to generate output/input from the host, I'm finding writes of 64 bytes bring the whole thing to a halt.   This of course is a magic number which should result in a zero-length packet (ZLP) being sent to complete the transaction.

So here are my questions -- for the CDC class code as generated from cube,

1)  how are ZLPs handled on input ?    Are they passed to  CDC_Receive_FS ?

2) How  should I generate them on output ?  Is this handled automatically in  USBD_CDC_TransmitPacket ?

Just as a side note I found the generated example app code to be full of issues -- it took a lot longer than it should have to get echo going.

Geoffrey

Outcomes