LPC1347 USB Control Transfer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1347 USB Control Transfer

4,943 Views
peter_furtner
NXP Employee
NXP Employee

Our customer SIGMATEK wants to implement USB Control Transfers on the LPC1347.

This works nice as long as they have a data length of less than 64 or more than 64 Bytes.

If the data length is exactly 64 Bytes (or a multiple of 64 bytes) then this does not work anymore.

What do they need to do to get this working??

Regards,

Peter

1 Reply

33 Views
dedog57501
Contributor I

Hello,
When USB data payloads equal an exact multiple of the endpoint's maximum packet size (64 bytes for Full-Speed), the receiver hangs because there is no short packet to signal the end of the transfer; to fix this on the LPC1347, SIGMATEK must check if the payload length is a non-zero multiple of 64 and, if so, manually send a Zero-Length Packet (ZLP) with a length of zero right after the main data block to flush the buffer, signal completion, and successfully terminate the transfer.

Best Regards

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-637960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC1347%20USB%20Control%20Transfer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-637960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOur%20customer%20SIGMATEK%20wants%20to%20implement%20USB%20Control%20Transfers%20on%20the%20LPC1347.%20%3C%2FP%3E%3CP%3EThis%20works%20nice%20as%20long%20as%20they%20have%20a%20data%20length%20of%20less%20than%2064%20or%20more%20than%2064%20Bytes.%3C%2FP%3E%3CP%3EIf%20the%20data%20length%20is%20exactly%2064%20Bytes%20(or%20a%20multiple%20of%2064%20bytes)%20then%20this%20does%20not%20work%20anymore.%3C%2FP%3E%3CP%3EWhat%20do%20they%20need%20to%20do%20to%20get%20this%20working%3F%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2413050%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC1347%20USB%20Control%20Transfer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2413050%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EWhen%20USB%20data%20payloads%20equal%20an%20exact%20multiple%20of%20the%20endpoint's%20maximum%20packet%20size%20(64%20bytes%20for%20Full-Speed)%2C%20the%20receiver%20hangs%20because%20there%20is%20no%20short%20packet%20to%20signal%20the%20end%20of%20the%20transfer%3B%20to%20fix%20this%20on%20the%20LPC1347%2C%20SIGMATEK%20must%20check%20if%20the%20payload%20length%20is%20a%20non-zero%20multiple%20of%2064%20and%2C%20if%20so%2C%20manually%20send%20a%20Zero-Length%20Packet%20(ZLP)%20with%20a%20length%20of%20zero%20right%20after%20the%20main%20data%20block%20to%20flush%20the%20buffer%2C%20signal%20completion%2C%20and%20successfully%20terminate%20the%20transfer.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%3C%2FP%3E%3C%2FLINGO-BODY%3E