2022-09-19 06:51:11 +00:00
|
|
|
# timer
|
2023-04-26 11:58:48 +00:00
|
|
|
A simple timer with prescaler.
|
2022-09-19 06:51:11 +00:00
|
|
|
|
|
|
|
## Introduction
|
2023-04-26 11:58:48 +00:00
|
|
|
This core implements a simple timer with a prescaler. The prescaler
|
|
|
|
allows measurement of time durations rather than cycles. If for
|
|
|
|
example setting the prescaler to the clock frequency in Hertz, the
|
|
|
|
timer will count seconds.
|
|
|
|
|
|
|
|
|
|
|
|
## Details
|
|
|
|
The timer counter and the prescaler counter are both 32 bits.
|
|
|
|
When enabled the counter counts down one integer value per cycle.
|
2023-05-02 11:57:29 +00:00
|
|
|
|
|
|
|
The timer will stop when reaching final zero (given by prescaler times the initial value of the timer)
|
|
|
|
and the running flag will be lowered.
|