embedded
system_error
ai_generated
partial
RTC:在TAMP2上检测到篡改事件,备份寄存器已清除,系统必须重新初始化
RTC: Tamper event detected on TAMP2, backup registers cleared, system must reinitialize
ID: embedded/rtc-tamper-battery-backed
80%修复率
84%置信度
1证据数
2025-01-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| STM32L4 series | active | — | — | — |
| STM32CubeMX v6.9.0 | active | — | — | — |
| HAL_RTC v2.3.0 | active | — | — | — |
根因分析
RTC TAMP2引脚上的篡改检测事件触发了自动清除备份寄存器(BKP)以保护敏感数据,需要完全重新初始化系统。
English
A tamper detection event on the RTC TAMP2 pin triggered automatic clearing of backup registers (BKP) to protect sensitive data, requiring full system reinitialization.
官方文档
https://www.st.com/resource/en/application_note/an4650-rtc-tamper-and-timestamp-features-in-stm32-microcontrollers-stmicroelectronics.pdf解决方案
-
Implement a debounce filter on the TAMP2 pin using a low-pass RC circuit (e.g., 10kΩ resistor + 100nF capacitor) to filter out transient glitches.
-
After tamper detection, restore backup registers from a secure non-volatile store (e.g., external EEPROM or flash) if the tamper was false.
无效尝试
常见但无效的做法:
-
Disable the tamper detection feature entirely
70% 失败
Removes security protection; may be unacceptable for applications requiring anti-tamper (e.g., metering, secure boot).
-
Short-circuit TAMP2 pin to ground to prevent false triggers
90% 失败
Damages the pin or causes short circuit; does not address the root cause of noise or mechanical tamper.
-
Reinitialize backup registers without checking tamper flag
80% 失败
Overwrites valid data and masks the tamper event, potentially allowing unauthorized access to persist.