1.3.7 Real Time Counter
The on-chip crystal oscillator circuit works with an off-chip crystal to generate a high-precision clock. It has an accuracy of 100 ppm (0.01%) and is capable of providing system clocks for Fusion peripherals and the other system clock networks, both on- and off-chip. When combined with the on-chip CCC/PLL blocks, a wide range of clock frequencies can be created to support various design requirements.
The Real Time Counter inside the Analog Block has the following features:
- The MATCH signal on the output of the system asserts when the value in the counter matches the value specified in the match register. Also, there is an optional output RTCPSMMATCH that is triggered on match. The RTCPSMMATCH signal must be connected to the RTCPSM macro so that the Voltage Regulator activates when the Match signal is asserted.
- If you use the RTC, RTCCLK must be driven by the External Crystal Oscillator driving the Fusion device and the mode of the Crystal oscillator must be controlled by the RTC.
- Displays two different views: Alarm or Custom view. The alarm time specified in the RTC dialog relates to the deassertion of one RTCMATCH signal to the reassertion of the signal.
For more information on connectivity, refer to the Designing with the Analog System. The figure below shows the Real Time Counter dialog box.

Time Alarm View
This view enables you to set time-based configuration of the RTC. The required time can be entered in days, hours, minutes, seconds, milliseconds, and microseconds. Granularity of achievable time values is based on the frequency you set. The actual time used is displayed in blue.
The Maximum Time shows the total representable time with the 40-bit register in the RTC and the specified clock frequency.
You can specify a required time, ASB displays an actual time. The actual time reflects what is actually achievable based on the clock frequency of the RTC.
For example, when the clock frequency is 32.768 kHz, each clock tick equals ~3.9 ms. If you enter 4ms and 100 s for a required time, ASB approximates using the next achievable time. In this example, 7.8ms (shown in the actual time field).
Register View
This view allows you to configure the RTC in its direct hardware representation. Also, this mode enables you to configure the initial value setting.
Initial Value
You may specify a different counter start value. The default is zero. This also is a 40 binary or a 10 bit hex value.
Match with Register Value
The MATCH signal asserts when the counter is equal to this register value (40-bit binary or 10-bit hex).
Crystal Oscillator Source
External crystal or ceramic oscillator – Oscillator is configured to work with an external crystal or ceramic resonator. RC network - Oscillator is configured to work with an external resistor-capacitor network.
RTC Clock Specification
RTCCLK – The frequency of the CLKOUT from the crystal oscillator
Based on this frequency and the crystal oscillator mode selection, ASB automatically configures the mode, as shown in the table below:
| Mode | Recommended Capacitor | Frequency Range (in MHz) |
|---|---|---|
| LOW_GAIN | 100 pf | 0.032 to 0.20 |
| MEDIUM_GAIN | 100 pf | 0.21 to 2.0 |
| HIGH_GAIN | 15 pf | 2.1 to 20.0 |
The RTCLK is divided internally by 128 to generate the frequency at which the real time counter operates. The frequency and period are shown in blue in the dialog box.
Reset count to zero when match occurs- Resets the counter to zero once the match occurs. This can be disabled for an application that measures elapsed time.
Export Match signal for Voltage Regulator Power Supply Monitor - Asserts the RTCPSMMATCH to activate the Voltage Regulator Power Supply Monitor (VRPSM).
If you wish to update the match and counter registers of the RTC dynamically, you must use ASB Advanced Options and select the ACM Bus checkbox.
