RTC_TAMP_FLAG
embedded
system_error
ai_generated
true
RTC: Tamper detection triggered on pin TAMP1, system halted
ID: embedded/rtc-tamper-detection-triggered
80%Fix Rate
85%Confidence
1Evidence
2024-03-15First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| STM32CubeFW_L4 v1.18.0 | active | — | — | — |
| HAL_RTC v2.0.3 | active | — | — | — |
| ARM Cortex-M4 r0p1 | active | — | — | — |
Root Cause
RTC tamper pin (TAMP1) detected an external event, causing a hardware-level system halt to protect sensitive data.
generic中文
RTC篡改引脚(TAMP1)检测到外部事件,导致硬件级系统停止以保护敏感数据。
Official Documentation
https://www.st.com/resource/en/reference_manual/dm00314099.pdfWorkarounds
-
85% success Disable the tamper pin in the RTC configuration after detecting the event: HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1);
Disable the tamper pin in the RTC configuration after detecting the event: HAL_RTCEx_DeactivateTamper(&hrtc, RTC_TAMPER_1);
-
75% success 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); }
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); }
中文步骤
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); }
Dead Ends
Common approaches that don't work:
-
90% fail
The tamper detection is edge-triggered; clearing the flag without reconfiguring the pin leaves the system in an unstable loop.
-
70% fail
Tamper detection is independent of the backup domain reset; it only depends on the TAMP pin configuration.