Skip to main content
Renesas Electronics America - Knowledgebase

(7545) Are latch and timer written to during write in and timer value read out?

Latest Updated:11/05/2008


(Timer)  Are the latch and the timer simultaneously written to during write-in and the timer value read during read-out regardless of whether the timer is in operation or suspended? [2008/11/05]


It depends on the type of timer, as detailed below:

Timer 1
Writing: Timer and timer latch
Reading: Count value of timer
Prescaler 1
Writing: Prescaler and prescaler latch
Reading: Count value of prescaler
Timer 2
The value written to timer 2 primary (T2P) while timer 2 is stopped is transferred to the timer 2 primary latch and the counter. The value written to timer 2 secondary (T2S) while timer 2 is stopped is transferred only to the timer 2 secondary latch.
When writing to timer 2 primary (T2P) and timer 2 secondary (T2S) after timer 2 count has started, the values will be transferred to only the respective latches. During writing, values cannot be transferred to the counter.
When timer 2 primary (T2P) is read, the count value of the timer is read. When timer 2 secondary (T2S) is read, a set value of timer 2 secondary is read. (Read the timer 2 primary to read the count value even during the count period of timer 2 secondary.) After timer 2 has stopped, the count value is retained until timer 2 primary (T2P) is written to, so reading timer 2 primary will read the count value of timer 2.
Timer 3
Writing: Timer suspended: Timer and timer latch
             Timer in operation: Timer latch only
Reading: Count value of timer


Suitable Products