System Clock via Timer/Counter 0¶
The TC0 timer is used to provide a time point at milli- and microsecond
resolution to implement the
interfaces defined in the
For this, the timer is configured to trigger a 1ms interrupt to increment the
millisecond counter. To compute the microsecond counter, the 8-bit timer counter
is used to interpolate between milliseconds via a 16x16=16-bit multiplication
and shift to avoid a division. This is very fast, however, the resolution of the
modm::PreciseClock is limited to at best ~4us (1000us/8-bit) and at worst
This module is only available for avr.
Limited availability: Check with 'lbuild discover' if this module is available for your target!