To operate the PIT, follow these steps:
- 1.Configure the RTC clock CLK_RTC as
described in Configure the Clock CLK_RTC.
- 2.Select the period for the interrupt
by writing the PERIOD bit field in the PIT Control A register (RTC.PITCTRLA).
- 3.Enable the interrupt by writing a '1'
to the Periodic Interrupt bit (PI) in the PIT Interrupt Control register
(RTC.PITINTCTRL).
- 4.Enable the PIT by
writing a '1' to the PIT Enable bit (PITEN) in the PIT Control A
register (RTC.PITCTRLA).
Note: The RTC peripheral is
used internally during device start-up. Always check the Busy bits in
the RTC.STATUS and RTC.PITSTATUS registers, also on initial
configuration.