24.4.1 Initialization
To operate the PIT, follow these steps:
- Configure the RTC clock CLK_RTC as described in 24.3.1.1 Configure the Clock CLK_RTC.
- Enable the interrupt by writing a '1' to the Periodic Interrupt bit (PI) in the PIT Interrupt Control register (RTC.PITINTCTRL).
- Select the period for the interrupt and enable the PIT by writing the desired value to the PERIOD bit field and 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.