A timer’s registers can sit on a bus without being counted at the bus frequency. Identify the timer’s actual input before using the register-interface clock to calculate an update interval.
An owned industrial acquisition board generates periodic internal requests. The diagnostic screen reports a 12 MHz peripheral bus. That would suggest one request every 200 µs if the timer ran at that rate, but the offline record shows a request every 100 µs. The external 24 MHz oscillator did not double in frequency. When the peripheral bus is divided, some microcontrollers can supply some timers on a separate route at twice the peripheral bus rate. Check the clock tree before diagnosing a crystal at an exact two-to-one discrepancy.
The register interface and counter need not use the same frequency
The processor needs bus access to timer registers, while the counter needs an input that advances it. Those functions can use different clock distribution paths. In one implementation, an undivided peripheral bus yields a timer input equal to the bus clock. When the bus prescaler is not one, the timer input can equal twice the bus rate. External inputs, other clocks, and timer-specific settings can also apply. This is one device rule, not a rule for every controller or timer.
This is not a guarantee that a crystal replacement will make the timer always run twice as fast. The ratio belongs to the internal distribution state. Changing clock source, bus prescaler, or module selection can change the relation. System and bus frequencies alone cannot establish the timer input.
Separate the distribution ratio upstream of the timer from the timer’s internal prescaler and count settings. They affect the interval at different stages. Combining them without distinction can multiply an error when a power-saving mode changes the tree. Trace the path from the known reference to the update event.
Hypothetical example: the same count gives two answers
This is a low-voltage timing calculation, not a register-programming recipe. Assume a 24 MHz reference and a 48 MHz internal system clock in the specified mode. One peripheral bus is divided by four to 12 MHz. Under the timer rule above and with that internal source selected, the timer input is 24 MHz instead of 12 MHz.
Assume no further timer prescaling and 2,400 effective counts per desired period. Then 2,400 ÷ 24,000,000 seconds gives 100 µs. Using 12 MHz in the denominator gives 200 µs, exactly twice as long. The example uses effective counts rather than a register value. Counter start and end values, direction, and update-event definitions determine how a field value maps to effective counts.
| Calculation point | Assumed value | What the value describes |
|---|---|---|
| External reference | 24 MHz | Input to the controller clock tree |
| System clock | 48 MHz | Verified internal upstream frequency |
| Peripheral bus | 12 MHz | Bus that hosts the registers |
| Timer input | 24 MHz | Counting frequency for this example |
| 2,400 effective counts | 100 µs | Theoretical acquisition-request interval |
An exact two-to-one ratio can also arise from a different edge definition, such as counting both edges for one event or generating two logs in one application loop. Verify whether the observation is a hardware update or a host action. If clock routing is correct, investigate counter and event interpretation.
Verify the 24 MHz reference at its own input point
If the board needs a 24 MHz, 1.2 V, single-ended CMOS oscillator, SCTF SX2M24.000E20F30THN is a starting candidate. Confirm the complete order code, supply, levels, temperature, and effective load. This does not identify any commercial controller’s parts or establish that the signal reaches the timer directly. Some operating modes may instead use an internal oscillator.
The nominal reference period is about 41.67 ns. A correct reading there does not establish every downstream divider. A doubled final event rate does not establish an incorrectly marked frequency. Verify the input, internal selection, and event individually before filing a material report. Do not ask an oscillator supplier to guarantee the controller’s firmware routing.
Assign each verified frequency to a node
On an owned isolated low-voltage setup or from offline logs, record hardware revision, mode, timer instance, and the applicable clock diagram. Use approved read-only records to verify actual selection. Keep external reference, system clock, bus, timer input, and counted result separate. If a stage cannot be observed directly, label a value derived from documentation and conditions as calculated.
| Verification point | Record | Misinterpretation to avoid |
|---|---|---|
| Reference input | Full code, test point, and operating conditions | Inferring a bad part from application request timing |
| Peripheral bus | Source, division, and active mode | Using register-bus rate as count rate |
| Timer input | Instance, actual source, and supported multiplier | Applying another controller generation’s rule |
| Counter | Prescaler, effective counts, and event definition | Double-counting endpoints or edges |
| Application | Separate times for request and acquisition | Confusing a correct timer with data-processing delay |
If purchasing specifies one acquisition per 100 µs, clarify whether that means triggering, completing, or receiving usable data. The events can be separated in time. Verify board events under specified modes and verify the external frequency source against its own electrical requirements. Keep the supplier commitments distinct.
Frequently asked questions
The bus and timer report the same frequency. Can we assume the next revision does too? No. Divider settings or source selection may change even if the external reference does not. Keep the current path and verify the next revision on the same basis.
Does doubling a software delay fix the problem? It may change a downstream observation without explaining the hardware event rate. Identify the timing requirement and verify the path and result before closing the issue.
Map each frequency to a node and calculate the period with a consistent count definition. Investigate oscillator quality when the external reference shows an independent, reproducible anomaly.
Under the same hypothetical rule, suppose the system clock stays at 48 MHz and the bus changes from undivided to divide-by-two. The bus changes from 48 MHz to 24 MHz, but the timer can still use 48 MHz because it moves from the equal-rate path to twice the bus clock. A bus-rate change therefore does not establish a timer-rate change. Keep both stages before and after the transition and report individual operating modes rather than an average.
