ML610Q111/ML610Q112 User’s Manual
Chapter 8 Timers
FEUL610Q111
8-39
8.4 Restriction of timer
8.4.1
Restriction 1
When using the 16bit timer configured cascading two 8bit timers, do not write “0FEh” to the lower byte of timer data
register(TMnD, n=8, A, E). Set data to any value except for “0FEh”(“00h to 0FDh” or “0FFh”). There is no restriction for
the higher byte of timer data register(TMmD, m=9, B, F).
If “0FEh” is written to the lower byte of the timer data register(TMnD, n=8, A, E), it works normally for the first interrupt
cycle but shortens the cycle by 256 clocks for the second or later interrupt because the timer counter is not reset to “0000h”
and restarts counting up from “0100h”.
8.4.2
Restriction 2
When using the 16bit timer configured by two 8bit timers and also if you restart the timer after the timer is stopped by the
software or automatically stopped in one shot timer mode, always reset the timer counter register(TMmC, TMnC, m=9, B,
F, n=8, A, E) to “0000h” by making a write operaton to the register (data is “don’t care”). The write operation to either
the higher byte register(TMmC, m=9, B, F) or lower byte register(TMnC, n=8, A, E) resets both registers. If an
intentional write of “00000h” to reset the timer counter registers is not done, the length of the first interrupt cycle after
restarting the timer may be incorrect.
8.4.3
Workaround
Example for programming code when using 16bit timer mode with Timer8 and Timer9 in order to avoid the
aforementioned restriction 1 and restriction 2 :
if ( TM8D == 0xfe ) TM8D = 0xfd; // Check the data of timer register (for restriction 1)
TM8C = 0x00; // Initializ the timer counter register (for restriction 2)
T8RUN = 1; // Star timer
The example shows that it checks the lower byte of timer data register(TM8D) and changes it to 0FDh if it
is 0FEh, and starts the timer after initializing the timer counter register (TM9C, TM8C).
Summary of Contents for ML610Q111
Page 1: ...ML610Q111 ML610Q112 User s Manual Issue Date Nov 16 2016 FEUL610Q111 05 ...
Page 14: ...Chapter 1 Overview ...
Page 26: ...Chapter 2 CPU and Memory Space ...
Page 34: ...Chapter 3 Reset Function ...
Page 38: ...Chapter 4 MCU Control Function ...
Page 53: ...Chapter 5 Interrupts INTs ...
Page 81: ...Chapter 6 Clock Generation Circuit ...
Page 95: ...Chapter 7 Time Base Counter ...
Page 103: ...Chapter 8 Timers ...
Page 145: ...Chapter 9 Watchdog Timer ...
Page 153: ...Chapter 10 PWM ...
Page 199: ...Chapter 11 Synchronous Serial Port ...
Page 212: ...Chapter 12 UART ...
Page 240: ...Chapter 13 I2 C Bus Interface Master ...
Page 254: ...Chapter 14 I2 C Bus Interface Slave ...
Page 269: ...Chapter 15 Port A ...
Page 279: ...Chapter 16 Port B ...
Page 291: ...Chapter 17 Port C ...
Page 303: ...Chapter 18 Port D ...
Page 312: ...Chapter 19 Port AB Interrupts ...
Page 317: ...Chapter 20 Successive Approximation Type A D Converter ...
Page 335: ...Chapter 21 Voltage Level Supervisor ...
Page 342: ...Chapter 22 Analog Comparator ...
Page 353: ...Chapter 23 Data Flash Memory ...
Page 373: ...Chapter 24 On chip Debug ...
Page 375: ...Appendixes ...
Page 393: ...Appendix E ...
Page 398: ...Revision History ...