USB NAK events continuously received

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

Recently I have a project which needs to interface usbn9603 with  MCU.
At PC side the XP can recognize the device as a HID device without
problem. However, I have traced the MCU program that it continuously
receive NAK events at end point 3. The endpoint 3 is enabled to
transfer data in initialization stage. However, I have not run any
program at the PC side.

Is it normal? Thanks!


Re: USB NAK events continuously received
Quoted text here. Click to load it
MCU.

Yes, it sounds like the host is polling according to the rate set in
the HID's endpoint descriptor.  If the device isn't ready to return any
data to the host, it NAKs.

-a


Re: USB NAK events continuously received
If the device has no data, does it return NAK?


Re: USB NAK events continuously received
Quoted text here. Click to load it

sure!
if the device isnt ready to receive data or has 0 bytes to return, but is
otherwise functioning OK then NAK is proper response.
NAK is not an error response. it means - not yet, try again later.

endpoints that are disabled or not existant or not initialized should return
nothing
endpoints that have faults or beind set to STALL should return STALL
all other initialized, enabled and not in error endpoints should return NAK

well this dependant of the implementation and software etc..

Antti



Site Timeline