GD32VF103 User Manual
58
4.3.2.
Tamper detection
In order to protect the important user data, the MCU provides the tamper detection function,
and it can be independently enabled on TAMPER pin by setting corresponding TPEN bit in
the BKP_TPCTL register. To prevent the tamper event from losing, the edge detection is
logically ANDed with the TPEN bit, used for tamper detection signal. So the tamper detection
configuration should be set before enable TAMPER pin. When the tamper event is detected,
the corresponding TEF bit in the BKP_TPCS register will be set. Tamper event can generate
an interrupt if tamper interrupt is enabled. Any tamper event will reset all Backup data registers.
Note:
When TPAL=0/1, if the TAMPER pin is already high/low before it is enabled(by setting
TPEN bit), an extra tamper event is detected, while there was no rising/falling edge on the
TAMPER pin after TPEN bit was set.