{
  "id": "embedded/can-fifo-overrun-error",
  "signature": "CAN error: FIFO overrun on mailbox 2, message lost",
  "signature_zh": "CAN错误：邮箱2 FIFO溢出，消息丢失",
  "regex": "CAN error: FIFO overrun on mailbox \\d, message lost",
  "domain": "embedded",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "CAN receive FIFO overflowed because the CPU did not read messages fast enough, causing loss of incoming frames.",
  "root_cause_type": "generic",
  "root_cause_zh": "CAN接收FIFO溢出，因为CPU读取消息速度不够快，导致传入帧丢失。",
  "versions": [
    {
      "version": "STM32CubeFW_F4 v1.27.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "HAL_CAN v2.0.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CANopen stack v4.0.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Faster baud rate increases message frequency, worsening the overflow issue.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Filtering reduces noise but does not address the root cause of slow message processing.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the CAN receive FIFO depth in configuration: hcan.Instance->FMR |= CAN_FMR_FINIT; hcan.Instance->FS1R |= CAN_FS1R_FSC1;",
      "success_rate": 0.8,
      "how": "Increase the CAN receive FIFO depth in configuration: hcan.Instance->FMR |= CAN_FMR_FINIT; hcan.Instance->FS1R |= CAN_FS1R_FSC1;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement DMA-based CAN message reading to offload CPU: HAL_CAN_Start_DMA(&hcan, CAN_RX_FIFO0);",
      "success_rate": 0.9,
      "how": "Implement DMA-based CAN message reading to offload CPU: HAL_CAN_Start_DMA(&hcan, CAN_RX_FIFO0);",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the CAN receive FIFO depth in configuration: hcan.Instance->FMR |= CAN_FMR_FINIT; hcan.Instance->FS1R |= CAN_FS1R_FSC1;",
    "Implement DMA-based CAN message reading to offload CPU: HAL_CAN_Start_DMA(&hcan, CAN_RX_FIFO0);"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.st.com/resource/en/reference_manual/dm00031020.pdf",
  "official_doc_section": null,
  "error_code": "CAN_FLAG_FOV",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-11-02",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}