This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28377D: Zero Length Data Packet of USB

Part Number: TMS320F28377D


Hi champs,

My customer is using USB device mode, finds that when the data packet size is equal to the maximum packet size, he has to transmit a zero length data packet so that host end transaction.

Does it make sense? If so, what is the right way to transmit a zero length data packet please?

Regards,

Lukc 

  • Hi Luke,

    In cases where the USB buffer has sent a full packet and then discovers that the transmit buffer is empty, the default behavior is to do nothing.  Some protocols, however, require that a zero-length packet be inserted to signal the end of the data. 

    There is a function USBBufferZeroLengthPacketInsert provided in the USB Library that can be used with the parameter bSendZLP set to true.

    Best Regards

    Siddharth

  • Hi Siddharth,

    To end transaction always, do you suggest my customer always sending a zero-length packet to the end of the data, in case some protocols need it? Or just need to send it when the last data packet is a full packet?

    Best regards,

    Luke