{
  "id": "embedded/usb-suspend-resume-failed",
  "signature": "USB: suspend/resume failed, device not responding to resume signaling",
  "signature_zh": "USB：挂起/恢复失败，设备未响应恢复信号",
  "regex": "USB: suspend/resume failed, device not responding to resume signaling",
  "domain": "embedded",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Host initiated resume signaling but device USB peripheral failed to exit suspend state due to misconfigured clock gating or missing interrupt handler.",
  "root_cause_type": "generic",
  "root_cause_zh": "主机发起恢复信号，但设备USB外设因时钟门控配置错误或中断处理程序缺失而未能退出挂起状态。",
  "versions": [
    {
      "version": "STM32Cube_FW_H7 v1.11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "FreeRTOS v10.4.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "USB_Device_Library v2.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase USB resume timeout in host driver",
      "why_fails": "Timeout increase does not address the device-side failure to re-enable clocks; resume signaling is already sent correctly by host.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Reinitialize USB peripheral on resume callback",
      "why_fails": "Full reinitialization resets endpoint state and can cause descriptor mismatch, leading to enumeration failure after resume.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure USB clock is enabled before entering suspend: modify HAL_PCD_SuspendCallback() to call __HAL_RCC_USB_OTG_FS_CLK_ENABLE() and set USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_WUIM.",
      "success_rate": 0.92,
      "how": "Ensure USB clock is enabled before entering suspend: modify HAL_PCD_SuspendCallback() to call __HAL_RCC_USB_OTG_FS_CLK_ENABLE() and set USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_WUIM.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add explicit wakeup pin handling: configure a GPIO EXTI line connected to USB_DP as falling edge trigger, and in the ISR call HAL_PCD_Resume() to force peripheral wakeup.",
      "success_rate": 0.88,
      "how": "Add explicit wakeup pin handling: configure a GPIO EXTI line connected to USB_DP as falling edge trigger, and in the ISR call HAL_PCD_Resume() to force peripheral wakeup.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "确保在进入挂起前启用USB时钟：修改HAL_PCD_SuspendCallback()，调用__HAL_RCC_USB_OTG_FS_CLK_ENABLE()并设置USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_WUIM。",
    "添加显式唤醒引脚处理：配置连接到USB_DP的GPIO EXTI线为下降沿触发，在ISR中调用HAL_PCD_Resume()强制外设唤醒。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.st.com/resource/en/application_note/an4879-usb-hardware-and-pcb-guidelines-for-stm32-mcus.pdf",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}