RTC_TAMP_FLAG
embedded
system_error
ai_generated
true
RTC:TAMP1引脚检测到篡改,系统已停止
RTC: Tamper detection triggered on pin TAMP1, system halted
ID: embedded/rtc-tamper-detection-triggered
80%修复率
85%置信度
1证据数
2024-03-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| STM32CubeFW_L4 v1.18.0 | active | — | — | — |
| HAL_RTC v2.0.3 | active | — | — | — |
| ARM Cortex-M4 r0p1 | active | — | — | — |
根因分析
RTC篡改引脚(TAMP1)检测到外部事件,导致硬件级系统停止以保护敏感数据。
English
RTC tamper pin (TAMP1) detected an external event, causing a hardware-level system halt to protect sensitive data.
官方文档
https://www.st.com/resource/en/reference_manual/dm00314099.pdf解决方案
-
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); }
无效尝试
常见但无效的做法:
-
90% 失败
The tamper detection is edge-triggered; clearing the flag without reconfiguring the pin leaves the system in an unstable loop.
-
70% 失败
Tamper detection is independent of the backup domain reset; it only depends on the TAMP pin configuration.