Datasheet

Table Of Contents
Related Links
21.3 Block Diagram
21.6.8.5.1 Timestamp
21.6.8.5.2 Active Layer Protection
21.6.8.5.1 Timestamp
As part of tamper detection the RTC can capture the counter value (COUNT/CLOCK) into the
TIMESTAMP register. Three CLK_RTC periods are required to detect the tampering condition and
capture the value. The TIMESTAMP value can be read once the Tamper flag in the Interrupt Flag register
(INTFLAG.TAMPER) is set. If the DMA Enable bit in the Control B register (CTRLB.DMAEN) is ‘1’, a DMA
request will be triggered by the timestamp. In order to determine which tamper source caused a capture,
the Tamper ID register (TAMPID) provides the detection status of each tamper channel and the tamper
input event. A DMA transfer can then read both TIMESTAMP and TAMPID in succession.
A new timestamp value cannot be captured until the Tamper flag is cleared, either by reading the
timestamp or by writing a ‘1’ to INTFLAG.TAMPER. If several tamper conditions occur in a short window
before the flag is cleared, only the first timestamp may be logged. However, the detection of each tamper
will still be recorded in TAMPID.
The Tamper Input Event (TAMPEVT) will always perform a timestamp capture. To capture on the external
inputs (INn), the corresponding Input Action field in the Tamper Control register (TAMPCTRL.INnACT)
must be written to ‘1’. If an input is set for wake functionality it does not capture the timestamp; however
the Tamper flag and TAMPID will still be updated.
Related Links
21.6.8.5 Tamper Detection
21.6.8.5.2 Active Layer Protection
The RTC provides a mean of detecting broken traces on the PCB , also known as Active layer Protection.
In this mode, a generated internal RTC signal can be directly routed over critical components on the
board using RTC OUT output pin to one RTC INn input pin. A tamper condition is detected if there is a
mismatch on the generated RTC signal.
The Active Layer Protection mode and the generation of the RTC signal is enabled by setting the
RTCOUT bit in the Control B register (CTRLB.RTCOUT).
Enabling active layer protection requires the following steps:
Enable the RTC prescaler output by writing a one to the RTC Out bit in the Control B register
(CTRLB.RTCOUT). The I/O pins must also be configured to correctly route the signal to the external
pins.
Select the frequency of the output signal by configuring the RTC Active Layer Frequency field in the
Control B register (CTRLB.ACTF).
GCLK_RTC_OUT =
CLK_RTC
2
CTRLB.ACTF+1
Enable the tamper input n (INn) in active layer mode by writing 3 to the corresponding Input Action
field in the Tamper Control register (TAMPCTRL.INnACT). When active layer protection is enabled
and INn and OUTn pin are used, the value of INn is sampled on the falling edge of CLK_RTC and
compared to the expected value of OUTn. Therefore up to one half of a CLK_RTC period is available
for propagation delay through the trace.
Enable Acitive Layer Protection by setting CTRLB.RTCOUT bit.
Related Links
SAM D5x/E5x Family Data Sheet
RTC – Real-Time Counter
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 297