21.6.5 Events

The RTC can generate the following output events and these events can be used by EVSYS module:

  • Overflow (OVF): Generated when the counter has reached its top value and wrapped to zero.
  • Tamper (TAMPER): Generated on detection of valid signal on a tamper input pin or tamper event input.
  • Compare (CMPn): Indicates a match between the counter value and the compare register.
  • Alarm (ALARMn): Indicates a match between the clock value and the alarm register.
  • Period n (PERn): The corresponding bit in the prescaler has toggled, see Periodic Intervals from Related Links.
  • Periodic Daily (PERD): Generated when the COUNT/CLOCK has incremented at a fixed period of time.
  • RTC Event (RTC_EVENT): Generates specific external signal on the RTC EVENT I/O pin.

Setting the Event Output bit in the Event Control Register (EVCTRL.xxxEO=1) enables the corresponding output event. Writing a zero to this bit disables the corresponding output event. See Event System (EVSYS) from Related Links for more details on configuring the event system.

The RTC can take the following actions on an input event:
  • Tamper (TAMPEVT): Capture the RTC counter to the timestamp register. See Tamper Detection from Related Links.

Writing a one to an Event Input bit into the Event Control register (EVCTRL.xxxEI) enables the corresponding action on input event. Writing a zero to this bit disables the corresponding action on input event.

RTC Event (RTC_EVENT): Other than the above events, which are mapped to the EVSYS module, the following events can generate specific external signal on the RTC EVENT I/O pin.

  • 32 KHz clock
  • Alarm pulse
  • 1-second clock

These event signals are configured using CFGCON4.RTCEVENTSEL[1:0] bits.

Note: The RTC_OUT and RTC_EVENT signals are multiplexed and any one of the signal can be out at a time in pin limited variants. See I/O Ports and Peripheral Pin Select (PPS) from Related Links. The selection between RTC_OUT and RTC_EVENT is configurable through CFGCON4.RTCEVTYPE bit.