HCD_ERR_STALL
embedded
protocol_error
ai_generated
true
USB:主机控制器驱动队列在端点0x81上停滞,传输无法继续
USB: HCD queue stall on endpoint 0x81, transfer not progressing
ID: embedded/usb-hcd-queue-stall
78%修复率
88%置信度
1证据数
2023-11-20首次发现
根因分析
USB主机控制器驱动在批量或控制端点上收到了设备的STALL握手信号,但驱动未清除该停滞状态,导致传输队列挂起。
English
USB host controller driver (HCD) encountered a STALL handshake from the device on a bulk or control endpoint, and the driver did not clear the stall condition, causing the transfer queue to hang.
官方文档
https://www.usb.org/document-library/usb-20-specification解决方案
-
Send a CLEAR_FEATURE control request to the stalled endpoint. Example using STM32 HAL: HCD_EP_ClrStall(&hhcd, ep_addr); where ep_addr is the endpoint address (e.g., 0x81).
-
Implement a recovery state machine in the USB class driver that detects stall events and automatically re-enqueues the transfer after clearing the halt.
无效尝试
常见但无效的做法:
-
70% 失败
Resetting the entire USB bus without clearing the endpoint stall causes the device to re-enter the same stall state immediately.
-
90% 失败
Increasing the USB transfer timeout does not resolve the stall; the device will remain stalled indefinitely.