You copied the Doc URL to your clipboard.

Why the SysTick Calibration TENMS value is one less than the number of clock cycles required for 10ms

Article ID: 103490418

Published date: 24 Jul 2017

Last updated: -

Applies to: Cortex-M

Question

Why is the SysTick Calibration TENMS value one less than the number of clock cycles required for 10ms?

Answer

The TENMS field is defined as the reload value for the counter that will yield a 10ms period.

Because the counter is an (n-1) down-to-zero counter, the TENMS field must be programmed to be one less than the number of cycles that make up the 10ms period.

To scale the counter to a different time interval the software must calculate a new reload value for the TENMS register field:

  1. Read the TENMS value.

  2. Increment this value by 1.

  3. Scale the result by the correct factor for the different time interval.

  4. Subtract 1 from the result to obtain the new reload register value.

Related information

None.

Was this page helpful? Yes No