Datasheet

ARM
©
dual timer module (SP804) RM0352
60/138 DocID024647 Rev 1
Load register, TimerXLoad
The TimerXLoad register is a 32-bit register that contains the value from which the counter
is to decrement. This is the value used to reload the counter when Periodic mode is
enabled, and the current count reaches zero.
When this register is written to directly, the current count immediately resets to the new
value at the next rising edge of TIMCLK which is enabled by TIMCLKENX.
Note: The minimum valid value for TimerXLoad is 1. If TimerXload is set to 0 then an interrupt is
generated immediately.
The value in this register is also overwritten if the TimerXBGLoad register is written to, but
the current count is not immediately affected.
If values are written to both the TimerXLoad and TimerXBGLoad registers before an
enabled rising edge on TIMCLK, then on the next enabled TIMCLK edge the value written to
the TimerXLoad value replaces the current count value. After that, each time the counter
reaches zero the current count value resets to the value written to TimerXBGLoad.
Reading from the TimerXLoad register at any time after the two writes have occurred
retrieves the value written to TimerXBGLoad. That is, the value read from TimerXLoad is
always the value that takes effect for Periodic mode after the next time the counter reaches
zero.
Current value register, TimerXValue
The TimerXValue register is a 32-bit read-only register that gives the current value of the
decrementing counter.
After a load operation has taken place by writing a new load value to TimerXLoad, the
TimerXValue register reflects the new load value immediately in the PCLK clock domain
without waiting for the next TIMCLK edge qualified by TIMCLKENX.
Note: The most significant 16 bits of the 32-bit TimerXValue register are not automatically set to 0
when in 16-bit timer mode. If the timer is in 16-bit mode then the most significant 16 bits of
the TimerXValue register might have a non-zero value if the timer was previously in 32-bit
mode and a write to the TimerXLoad register has not occurred since the change to 16-bit
mode.