{
  "id": "embedded/usb-cdc-acm-buffer-overflow",
  "signature": "USB CDC: ACM data buffer overflow, 64 bytes discarded on endpoint 0x81",
  "signature_zh": "USB CDC: ACM数据缓冲区溢出，端点0x81上丢弃64字节",
  "regex": "USB CDC: ACM data buffer overflow, \\d+ bytes discarded on endpoint 0x[0-9A-Fa-f]+",
  "domain": "embedded",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The USB CDC receive buffer is full because the application does not read data fast enough from the virtual COM port, causing overflow.",
  "root_cause_type": "generic",
  "root_cause_zh": "USB CDC接收缓冲区已满，因为应用程序未能足够快地从虚拟COM端口读取数据，导致溢出。",
  "versions": [
    {
      "version": "STM32Cube_FW_F4 v1.27.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "TinyUSB v0.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "USB CDC Class v1.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase the USB buffer size in the CDC configuration",
      "why_fails": "Larger buffers only delay the overflow but do not fix the root cause of slow data consumption; eventually overflow still occurs.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce the baud rate of the virtual COM port to slow transmission",
      "why_fails": "Baud rate is irrelevant for USB CDC; data is packet-based and the host can still send at full speed.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement a circular buffer in the application to store incoming USB data and process it in a lower-priority task, ensuring the CDC receive interrupt never blocks.",
      "success_rate": 0.85,
      "how": "Implement a circular buffer in the application to store incoming USB data and process it in a lower-priority task, ensuring the CDC receive interrupt never blocks.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the polling rate of the CDC receive function in the main loop, e.g., call CDC_Receive_FS() every 1ms instead of 10ms.",
      "success_rate": 0.78,
      "how": "Increase the polling rate of the CDC receive function in the main loop, e.g., call CDC_Receive_FS() every 1ms instead of 10ms.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Implement a circular buffer in the application to store incoming USB data and process it in a lower-priority task, ensuring the CDC receive interrupt never blocks.",
    "Increase the polling rate of the CDC receive function in the main loop, e.g., call CDC_Receive_FS() every 1ms instead of 10ms."
  ],
  "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-using-stm32-mcus-stmicroelectronics.pdf",
  "official_doc_section": null,
  "error_code": "CDC_OVF_ERR",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}