|
发表于 2023-10-18 12:40:47
|
显示全部楼层
感谢回复,我在USB官网的USB 2.0 Specification(usb_20_20230224.zip)里的usb_20.pdf也找到了对应的信息:
4.5.2 Error Handling
The protocol allows for error handling in hardware or software. Hardware error handling includes reporting
and retry of failed transfers. A USB Host Controller will try a transmission that encounters errors up to
three times before informing the client software of the failure. The client software can recover in an
implementation-specific way.
In the host controller error cases, the host controller implements the “three strikes and you’re out”
mechanism.
以及
In the host controller error cases, the host controller implements the “three strikes and you’re out”
mechanism. That is, it increments an error count (err_count) and, if the count is less than three (transition
“se4”), it will retry the transaction. If the err_count is greater or equal to three (transition “se5”), the host
controller does endpoint halt processing and does not retry the transaction.
和其他的three strikes之类。
我之所以对这一点这么感兴趣是因为沁恒提供的USB示例代码中对于stall什么处理也没有。我在想如果能妥善的通过重枚举或者别的什么方式处理好因为出错而导致的stall,可能就能解决或者部分解决干扰的问题。 |
|