PORTS Forum

Ports and Interfaces => USB => Topic started by: ulao on November 04, 2017, 09:11:36 pm

Title: is there a NAK timeout?
Post by: ulao on November 04, 2017, 09:11:36 pm
In working on a project that needs to disable the interrupt on my chip. Though doing this will cause the USB layer to not produce the keep alive. This will naturally stall any transfers. So to avoid this issue I use the usb function available to me to suppress control transfers (DisableAllRequests and EnableAllRequests) and handle my interrupt in's appropriately.

 the DisableAllRequests  function will return NAK to the host until EnableAllRequests clears the condition. What I'm wondering is, if there is a timeout for the host. Correct me if I'm wrong but that the host will retry the control transfer if a NAK is received indefinitely?
Title: Re: is there a NAK timeout?
Post by: Jan Axelson on November 05, 2017, 08:55:51 pm
The absence of a low-speed keep alive will cause the device to enter the Suspend state.

Devices can't NAK endlessly in control transfers. See the USB spec for details.
Title: Re: is there a NAK timeout?
Post by: ulao on November 06, 2017, 10:15:12 am
spec says "The device may delay Command Transport indefinitely by NAK in the Data Stage and/or Status Stage of
the Control Transfer, subject to the limitations expressed in the rest of this specification."

I Could not find the "limitations".
Title: Re: is there a NAK timeout?
Post by: Jan Axelson on November 06, 2017, 11:01:24 am
The text you quoted applies only to commands sent to CBI mass-storage devices.

See 2.3.2.4 in the CBI spec for limitations.