14.2. Wake-up Timer Interrupt Function
The wake-up timer interrupt function generates an interrupt event periodically at any fixed cycle set between 244.14 s and 31.9
years. This function can stop at one time and is available as an accumulative timer.
After the interrupt occurs, the /INT status is automatically cleared .
14.2.1. Related registers for function of wake-up timer interrupt function
Table 16 Wake-up interrupt timer register
Before entering operation settings, we recommend first clearing the TE bit to "0" .
When the fixed-cycle timer function is not being used, the fixed-cycle Timer Counter0,1 register can be used as a RAM register. In
such cases, stop the fixed-cycle timer function by writing "0" to the TE and TIE bits.
1) Down counter for wake-up interrupt timer Timer Counter 2, 1, 0
This register is used to set the default (preset) value for the counter. Any count value from 1 (000001h) to 16777216 (FFFFFFh) can
be set.
Be sure to write "0" to the TE bit before writing the preset value.
When TE = 0, read out data of timer counter is default (Preset) value. And when TE = 1, read out data of timer counter is just
counting value. But, when access to timer counter data, counting value is not held.
Therefore, for example, perform twice read access to obtain right data, and a way to adopt the case that two data accorded is
necessary.
2) TSEL1, TESL0 bit
This combination decides the source clock of count down period.
The source clock selection should be done after TE bit setting to “0”.
Table 17 TSEL bit, selection of source clock