
APPENDIX
S3C9654/C9658/P9658
19-2
STALL CONDITION
Application:
KS86P/C610x4, KS86P/C6504, KS86P/C6408.
Condition:
1.
In during the a Data stage a command pipe sent more data or is requested to return more data than was
indicated in the Setup stage, it should return STALL.(8.5.2.1)
2.
In BULK transfer if the endpoint was halted, STALL is returned to indicate that the host should not retry the
transmission because there is an error on the function.(8.5.1)
3.
When a request is received by a device that is not defined for the device, is inappropriate for the current
setting of the device, or has values that are note compatible with the request, then a Request Error exists.
The device deals with the Request Error by returning a STALL PID in response to the next Data stage
transaction or in the Status stage of the message.(9.2.7)
4.
If an unsupported or invalid request is made to a USB device, the device responds by returning STALL in the
Data or Status stage of the request. If the device detects the error in the Setup stage, it is preferred that the
device returns STALL at the earlier of the Data of Status stage.(9.4)
5.
Control pipes have the unique ability to return a STALL handshake due to function problems in control
transfer.
Related flag:
1.
EP0CSR.2 (Sent Stall)
This flag set by hardware when the USB module send stall packet to host.
2.
EP0CSR.5 (Send Stall)
This flag set by MCU if the user want to send stall packet to host. This flag automatically cleared by hardware
when send one stall packet to host.
3.
EP1CSR.1 (Force Stall)
This flag set by MCU if the user want to send stall packet to host. If this flag is set by user then USB module
continuously send stall packet to host until cleared by MCU.
By setting the flag:
1.
Endpoint 0 (Control endpoint)
If there is problem and MCU want to send stall during control transfer then MCU should set send stall flag for
one time send stall packet. You must notice after send one stall packet this flag cleared by hardware. (See
example below)
2.
Endpoint 1 (interrupt endpoint)
If MCU want to send stall packet during interrupt transfer then MCU should set this flag. If this flag is set the
USB controller send stall packet continuously. If MCU clear this flag then USB controller stop send stall
packet. The hardware does not clear this flag automatically so MCU should clear this flag after solve
the stall condition.