Missing ACK on USB OUT Transactions

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

Missing ACK on USB OUT Transactions

203 Views
JacobBerggreen
Contributor II

My team is having some issues with missing ACKs on USB OUT transactions.

Some info on our system:

* The MCU is LPC5528

* SDK version is 26.03.00.

* For call to USB_DeviceInit, we supply kUSB_ControllerLpcIp3511Fs0 as the first parameter (controllerId) so we're using USB full speed.

It's hard to say much about patterns. What we can state is:

* When we send a lot of messages over USB, once in a while an OUT transaction is missing the ACK. We've caught this with an Ellisys USB analyser. We can see the missing OUT, then 3 retries from the PC and then a USB reset.

* It happens rarely. We set up a script repeating the same simple USB message (target just returns some data, no heavy computing etc.). Sometimes it takes a few iterations, other times thousands of iterations, before the error happens.

We'd like to know if this is a known issue or perhaps there are some tricks to debugging it.

0 Kudos
Reply
1 Reply

75 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @JacobBerggreen 

We have checked the  errata of LPC55S2x/LPC552x and have not found any known issues with the lack of ACK directy corresponding to USB0 full speed device OUT. Currently, USB errata mainly focuses on high-speed mode, so it is not directly applicable to your configuration.
From the phenomenon, the more likely reason is that the OUT endpoint did not prepare the receiving buffer in a timely manner at certain moments, resulting in the device being unable to respond to ACK when the host sends OUT, triggering retry or even reset. It is recommended to focus on confirming whether USB_SeviceRecvRequest() is immediately called after each OUT is completed, and try to minimize the processing in the callback. It is also recommended to check the priority of USB interrupts, avoid long shutdown interrupts.

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2386752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMissing%20ACK%20on%20USB%20OUT%20Transactions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2386752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMy%20team%20is%20having%20some%20issues%20with%20missing%20ACKs%20on%20USB%20OUT%20transactions.%3C%2FP%3E%3CP%3ESome%20info%20on%20our%20system%3A%3C%2FP%3E%3CP%3E*%20The%20MCU%20is%20LPC5528%3C%2FP%3E%3CP%3E*%20SDK%20version%20is%2026.03.00.%3C%2FP%3E%3CP%3E*%20For%20call%20to%20USB_DeviceInit%2C%20we%20supply%20kUSB_ControllerLpcIp3511Fs0%20as%20the%20first%20parameter%20(controllerId)%20so%20we're%20using%20USB%20full%20speed.%3C%2FP%3E%3CP%3EIt's%20hard%20to%20say%20much%20about%20patterns.%20What%20we%20can%20state%20is%3A%3C%2FP%3E%3CP%3E*%20When%20we%20send%20a%20lot%20of%20messages%20over%20USB%2C%20once%20in%20a%20while%20an%20OUT%20transaction%20is%20missing%20the%20ACK.%20We've%20caught%20this%20with%20an%20Ellisys%20USB%20analyser.%20We%20can%20see%20the%20missing%20OUT%2C%20then%203%20retries%20from%20the%20PC%20and%20then%20a%20USB%20reset.%3C%2FP%3E%3CP%3E*%20It%20happens%20rarely.%20We%20set%20up%20a%20script%20repeating%20the%20same%20simple%20USB%20message%20(target%20just%20returns%20some%20data%2C%20no%20heavy%20computing%20etc.).%20Sometimes%20it%20takes%20a%20few%20iterations%2C%20other%20times%20thousands%20of%20iterations%2C%20before%20the%20error%20happens.%3C%2FP%3E%3CP%3EWe'd%20like%20to%20know%20if%20this%20is%20a%20known%20issue%20or%20perhaps%20there%20are%20some%20tricks%20to%20debugging%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2387467%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Missing%20ACK%20on%20USB%20OUT%20Transactions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2387467%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F191150%22%20target%3D%22_blank%22%3E%40JacobBerggreen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20have%20checked%20the%26nbsp%3B%20errata%20of%20LPC55S2x%2FLPC552x%20and%20have%20not%20found%20any%20known%20issues%20with%20the%20lack%20of%20ACK%20directy%20corresponding%20to%20USB0%20full%20speed%20device%20OUT.%20Currently%2C%20USB%20errata%20mainly%20focuses%20on%20high-speed%20mode%2C%20so%20it%20is%20not%20directly%20applicable%20to%20your%20configuration.%3CBR%20%2F%3EFrom%20the%20phenomenon%2C%20the%20more%20likely%20reason%20is%20that%20the%20OUT%20endpoint%20did%20not%20prepare%20the%20receiving%20buffer%20in%20a%20timely%20manner%20at%20certain%20moments%2C%20resulting%20in%20the%20device%20being%20unable%20to%20respond%20to%20ACK%20when%20the%20host%20sends%20OUT%2C%20triggering%20retry%20or%20even%20reset.%20It%20is%20recommended%20to%20focus%20on%20confirming%20whether%20USB_SeviceRecvRequest()%20is%20immediately%20called%20after%20each%20OUT%20is%20completed%2C%20and%20try%20to%20minimize%20the%20processing%20in%20the%20callback.%20It%20is%20also%20recommended%20to%20check%20the%20priority%20of%20USB%20interrupts%2C%20avoid%20long%20shutdown%20interrupts.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E