{
  "id": "embedded/rtc-tamper-detection-triggered",
  "signature": "RTC: Tamper detection triggered on pin TAMP1, system halted",
  "signature_zh": "RTC：TAMP1引脚检测到篡改，系统已停止",
  "regex": "RTC: Tamper detection triggered on pin TAMP1, system halted",
  "domain": "embedded",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "RTC tamper pin (TAMP1) detected an external event, causing a hardware-level system halt to protect sensitive data.",
  "root_cause_type": "generic",
  "root_cause_zh": "RTC篡改引脚（TAMP1）检测到外部事件，导致硬件级系统停止以保护敏感数据。",
  "versions": [
    {
      "version": "STM32CubeFW_L4 v1.18.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "HAL_RTC v2.0.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ARM Cortex-M4 r0p1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The tamper detection is edge-triggered; clearing the flag without reconfiguring the pin leaves the system in an unstable loop.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Tamper detection is independent of the backup domain reset; it only depends on the TAMP pin configuration.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Disable the tamper pin in the RTC configuration after detecting the event: HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1);",
      "success_rate": 0.85,
      "how": "Disable the tamper pin in the RTC configuration after detecting the event: HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1);",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement a debounce mechanism in firmware to filter out spurious tamper events: if (HAL_GPIO_ReadPin(TAMP1_GPIO_Port, TAMP1_Pin) == GPIO_PIN_RESET) { HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1); }",
      "success_rate": 0.75,
      "how": "Implement a debounce mechanism in firmware to filter out spurious tamper events: if (HAL_GPIO_ReadPin(TAMP1_GPIO_Port, TAMP1_Pin) == GPIO_PIN_RESET) { HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1); }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Disable the tamper pin in the RTC configuration after detecting the event: HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1);",
    "Implement a debounce mechanism in firmware to filter out spurious tamper events: if (HAL_GPIO_ReadPin(TAMP1_GPIO_Port, TAMP1_Pin) == GPIO_PIN_RESET) { HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1); }"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.st.com/resource/en/reference_manual/dm00314099.pdf",
  "official_doc_section": null,
  "error_code": "RTC_TAMP_FLAG",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}