External Frequency Measurement

When using an external measurement tool to do frequency measurement, the 32.768 kHz crystal oscillator output must be available on a pin. This can be done either using an Event from the RTC or PIT, and configuring a pin as a user, or by using the 32.768 kHz crystal as the main clock.

The RTC, when enabled, will generate the following output events:

When enabled, the PIT generates the following 50% duty cycle clock signals on its event outputs:

The event users are configured by the Event System (EVSYS).

When using the 32.768 kHz crystal as the main clock source, there are several ways of routing the clock out of the pin.

It is not recommended to attach a probe directly to the crystal circuit, to measure the frequency. This will change the characteristics of the circuit and alter the crystal frequency.

The following two examples shows how to output the 32.768 kHz crystal to a pin. One example shows how to use the system clock, and one shows how to use the RTC and Event System.