15.2.3 Periodic Events

The RTC can generate events at periodic intervals, allowing for direct peripheral actions without CPU intervention. The periodic events can be generated on the upper eight bits of the RTC prescaler, and will be generated on the rising edge transition of the specified bit. The resulting periodic frequency can be calculated by the following formula:

fPERIODIC=fASY2n+3
Where
fASY
refers to the asynchronous clock set up in the RTC module configuration. For the RTC to operate correctly in calendar mode, this frequency must be 1KHz, while the RTC's internal prescaler should be set to divide by 1024. The n parameter is the event source generator index of the RTC module. If the asynchronous clock is operated at the recommended 1KHz, the formula results in the values shown in Table 15-1.
Table 15-1. RTC Event Frequencies for Each Prescaler Bit Using a 1KHz Clock

n

Periodic event

7

1Hz

6

2Hz

5

4Hz

4

8Hz

3

16Hz

2

32Hz

1

64Hz

0

128Hz

Note: The connection of events between modules requires the use of the SAM Event System Driver (EVENTS) to route output event of one module to the input event of another. For more information on event routing, refer to the event driver documentation.