
Tamper and backup registers (TAMP)
RM0453
1036/1454
RM0453 Rev 2
33.3.3 TAMP
register write protection
After system reset, the TAMP registers (including backup registers) are protected against
parasitic write access by the DBP bit in the power control peripheral (refer to the PWR
power control section). DBP bit must be set in order to enable TAMP registers write access.
33.3.4 Tamper
detection
The tamper detection can be configured for the following purposes:
•
erase the backup registers and the SRAMs listed in
Table 218: TAMP interconnection
(default configuration)
•
generate an interrupt, capable to wakeup from Stop and Standby mode
•
generate a hardware trigger for the low-power timers
TAMP backup registers
The backup registers (TAMP_BKPxR) are not reset by system reset or when the device
wakes up from Standby mode.
The backup registers are reset when a tamper detection event occurs except if the
TAMPxNOER bit is set, or if the TAMPxMSK is set in the TAMP_CR2 register, or if the
ITAMPxNOER bit is set in the TAMP_CR3 register.
The backup registers and the device secrets erased by tamp_erase signal (refer to
Table 218: TAMP interconnection
) can be reset by software by setting the BKERASE bit in
the TAMP_CR2 register.
Note:
The backup registers are also erased when the readout protection of the flash is changed
from level 1 to level 0.
Tamper detection initialization
Each input can be enabled by setting the corresponding TAMPxE bits to 1 in the TAMP_CR
register.
Each TAMP_INx tamper detection input is associated with a flag TAMPxF in the TAMP_SR
register.
When TAMPxMSK is cleared:
The TAMPxF flag is asserted after the tamper event on the pin, with the latency provided
below:
•
3 ck_apre cycles when TAMPFLT differs from 0x0 (level detection with filtering)
•
3 ck_apre cycles when TAMPTS = 1 (timestamp on tamper event)
•
No latency when TAMPFLT = 0x0 (edge detection) and TAMPTS = 0
A new tamper occurring on the same pin during this period and as long as TAMPxF is set
cannot be detected.
When TAMPxMSK is set:
A new tamper occurring on the same pin cannot be detected during the latency described
above and 2.5 ck_rtc additional cycles.
By setting the TAMPxIE bit in the TAMP_IER register, an interrupt is generated when a
tamper detection event occurs (when TAMPxF is set). Setting TAMPxIE is not allowed when
the corresponding TAMPxMSK is set.