Bkp Functional Description; Tamper Detection; Rtc Calibration - ST STM32F102 Series Reference Manual

Hide thumbs Also See for STM32F102 Series:
Table of Contents

Advertisement

Backup registers (BKP)
5.3

BKP functional description

5.3.1

Tamper detection

The TAMPER pin generates a Tamper detection event when the pin changes from 0 to 1 or
from 1 to 0 depending on the TPAL bit in the
detection event resets all data backup registers.
However to avoid losing Tamper events, the signal used for edge detection is logically
ANDed with the Tamper enable in order to detect a Tamper event in case it occurs before
the TAMPER pin is enabled.
When TPAL=0: If the TAMPER pin is already high before it is enabled (by setting TPE
bit), an extra Tamper event is detected as soon as the TAMPER pin is enabled (while
there was no rising edge on the TAMPER pin after TPE was set)
When TPAL=1: If the TAMPER pin is already low before it is enabled (by setting the
TPE bit), an extra Tamper event is detected as soon as the TAMPER pin is enabled
(while there was no falling edge on the TAMPER pin after TPE was set)
By setting the TPIE bit in the BKP_CSR register, an interrupt is generated when a Tamper
detection event occurs.
After a Tamper event has been detected and cleared, the TAMPER pin should be disabled
and then re-enabled with TPE before writing to the backup data registers (BKP_DRx) again.
This prevents software from writing to the backup data registers (BKP_DRx), while the
TAMPER pin value still indicates a Tamper detection. This is equivalent to a level detection
on the TAMPER pin.
Note:
Tamper detection is still active when V
of the data backup registers, the TAMPER pin should be externally tied to the correct level.
5.3.2

RTC calibration

For measurement purposes, the 32.768 kHz RTC clock can be output on the TAMPER pin.
This is enabled by setting the CCO bit in the
The clock can be slowed down by up to 121 ppm by configuring CAL[6:0] bits.
For more details about RTC calibration and how to use it to improve timekeeping accuracy,
please refer to AN2604 "STM32F101xx and STM32F103xx RTC calibration".
62/690
Backup control register
power is switched off. To avoid unwanted resetting
DD
RTC clock calibration register
RM0008
(BKP_CR). A tamper
(BKP_RTCCR).

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F102 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f101 seriesStm32f103 series

Table of Contents