{
  "id": "embedded/crc-checksum-mismatch-bootloader",
  "signature": "Bootloader: CRC check failed for application image at 0x08020000, expected 0xABCD1234, got 0x5678EF00",
  "signature_zh": "引导加载程序：应用程序镜像在0x08020000的CRC校验失败，期望0xABCD1234，实际0x5678EF00",
  "regex": "Bootloader: CRC check failed for application image at 0x[0-9A-Fa-f]+, expected 0x[0-9A-Fa-f]+, got 0x[0-9A-Fa-f]+",
  "domain": "embedded",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The CRC32 checksum computed over the flash application region does not match the stored checksum, indicating corruption during programming, incomplete flash write, or a mismatch in CRC polynomial/seed.",
  "root_cause_type": "generic",
  "root_cause_zh": "对闪存应用程序区域计算的CRC32校验和与存储的校验和不匹配，表明编程期间损坏、闪存写入不完整或CRC多项式/种子不匹配。",
  "versions": [
    {
      "version": "STM32CubeProgrammer v2.14.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GCC ARM Embedded 13.2.Rel1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "OpenOCD 0.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the root cause is a hardware flash issue (e.g., bad sector or voltage drop), re-flashing the same binary will produce the same CRC mismatch.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This bypasses safety entirely; a corrupted image may execute and cause undefined behavior or system failure.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The bootloader expects a specific polynomial and length; mismatch will always fail.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Re-program the flash using a verified programming tool (e.g., ST-Link CLI) with full erase and verify enabled: `st-flash --reset --format ihex write firmware.hex`",
      "success_rate": 0.85,
      "how": "Re-program the flash using a verified programming tool (e.g., ST-Link CLI) with full erase and verify enabled: `st-flash --reset --format ihex write firmware.hex`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check CRC polynomial and seed match between bootloader and image generation script; ensure both use CRC-32 (0x04C11DB7) with initial value 0xFFFFFFFF.",
      "success_rate": 0.9,
      "how": "Check CRC polynomial and seed match between bootloader and image generation script; ensure both use CRC-32 (0x04C11DB7) with initial value 0xFFFFFFFF.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure flash supply voltage (VDD) is within spec (2.7V-3.6V for STM32F4) during programming; brown-out can cause partial writes.",
      "success_rate": 0.7,
      "how": "Ensure flash supply voltage (VDD) is within spec (2.7V-3.6V for STM32F4) during programming; brown-out can cause partial writes.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Re-program the flash using a verified programming tool (e.g., ST-Link CLI) with full erase and verify enabled: `st-flash --reset --format ihex write firmware.hex`",
    "Check CRC polynomial and seed match between bootloader and image generation script; ensure both use CRC-32 (0x04C11DB7) with initial value 0xFFFFFFFF.",
    "Ensure flash supply voltage (VDD) is within spec (2.7V-3.6V for STM32F4) during programming; brown-out can cause partial writes."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.st.com/resource/en/application_note/an3155-how-to-use-the-crc-peripheral-in-stm32-mcus.pdf",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-11-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}