USB NAK events continuously received

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!

Reply to
dereklai2k
Loading thread data ...

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

Reply to
Bassman59a

If the device has no data, does it return NAK?

Reply to
dereklai2k

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

Reply to
avrbasic

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.