SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The real-time counter (COUNTER_REALTIME) is a free-running counter which produces the count used by the private timer peripherals in the MPU_CLUSTER. For this reason, it is also called Master Counter.
COUNTER_REALTIME supports two modes of operation:
COUNTER_REALTIME has two clock inputs:
COUNTER_REALTIME implements two internal counters: a 40-bit coarse counter, and a 48-bit system counter.
The coarse counter is driven by the FUNC_32K_CLK clock. The coarse counter is the only one running in LP mode (the system counter is off in LP mode) and it is also used in FUNC mode as a timebase reference for the system counter. During active mode, the coarse counter value is multiplied by 375/2. This effectively shifts left the base counter value. This initial value is output to the CPUs and is also fed back into the circuit.
The system clock is running in parallel to the 32K clock and it drives the active mode circuit of COUNTER_REALTIME, which includes the following basic blocks:
At each system clock rising edge, the system counter value is compared to the shifted (x375/2) coarse counter value and based on this comparison, the system counter is either incremented or unchanged.
COUNTER_REALTIME is designed for a count rate of 6.144 million counts per second (32768Hz x 375/2). Since the SoC does not use a true 32768Hz source (instead uses SYS_CLK1/610, which is ~32787Hz for 20MHz SYS_CLK1), the resulting timer rate is not 6.144 and timer drift can accumulate. To minimize error in active mode, the adjustable fine increment rate MUST equal the fixed coarse increment rate.
Table 4-4 shows suggested COUNTER_REALTIME increment values.
COUNTER_ REALTIME Clock Mode | COUNTER_ REALTIME Clock Name | COUNTER_ REALTIME Fast Source Rate (Hz) | Numerator (N) for Fast Source | Denominator (D) for Fast Source | COUNTER_REALTIME Fine Rate (Hz) | COUNTER_REALTIME 32K Source Rate (Hz) | COUNTER_REALTIME Fixed Coarse Rate (Hz) |
---|---|---|---|---|---|---|---|
Target 32K*(375/2) | (Sys clock)*(N/D) | (SYSCLK1/610) | 32K*(375/2) | ||||
System (SYS) | SYS_CLK1 | 19,200,000 | 75 | 244 | 5,901,639.3 | 31,475 | 5,901,639.3 |
20,000,000 | 75 | 244 | 6,147,541.0 | 32,787 | 6,147,541.0 | ||
27,000,000 | 75 | 244 | 8,299,180.3 | 44,262 | 8,299,180.3 | ||
ABE Low-Power (ABE_LP) | ABE_LP_CLK | 12,288,000 | 1875 | 3904 | 5,901,639.3 | 31,475 | 5,901,639.3 |
868 | 1735 | 6,147,541.2 | 32,787 | 6,147,541.0 | |||
955 | 1414 | 8,299,179.6 | 44,262 | 8,299,180.3 | |||
Low-Power (LP) | FUNC_32K_CLK | NA | NA | NA | NA | 31,475 | 5,901,639.3 |
NA | NA | NA | NA | 32,787 | 6,147,541.0 | ||
NA | NA | NA | NA | 44,262 | 8,299,180.3 |