
ML62Q1000 Series User's Manual
Chapter 7 Low Speed Time Base Counter
FEUL62Q1000
7-13
7.3 Description of Operation
7.3.1 Low-speed Time Base Counter Operation
The low-speed time base counter (LTBC) starts counting up from 0x0000 at the falling edge of the low-speed clock after
releasing the system reset, then generates T128HZ to T1HZ signals. Three factors can be chosen from among T128HZ to
T1HZ signals to generate periodical low-speed time base counter interrupt requests.
Values of T128HZ to T1HZ signals can be read from the LTBR register.
The low-speed time base counter interrupt request is generated at the falling edge of a signal chosen in the LTBINT
register.
When changing the assignment of interrupt signals in the LTBINT register, low-speed time base counter interrupt
requests (LTBCnINT) may be generated depending on timing to write to the register. Therefore, change the value in the
LTBINT register with the interrupt disabled in the IE67 register before changing the assignment of interrupt signals, and
clear the generated low-speed time base counter interrupt request bit (QLTBCn) to "0". (n = 0 to 2)
Figure 7-3 shows a sample program for changing the assignment of low-speed time base counter signals.
Figure 7-3 Sample Program for Changing Assignment of Low-speed Time Base Counter Signals
The time equivalent to one clock of the system clock is required for the low-speed time base counter interrupt request bit
(QLTBCn bit of IRQ67 register, n=0 to 2) to become "1" after changing the LTBINT register . Therefore, place one NOP
instruction after changing the LTBINT register.
When writing arbitrary data to the LTBR register, T128HZ to T1HZ signals of the LTBR register are all initialized to "0".
Depending on timing to write to the LTBR register, the signal assigned to the LTBINT register may change from "1" to
"0". Also a low-speed time base counter interrupt request may occur. Therefore, with the low-speed time base counter
interrupt disabled in the IE67 register, following writing to the LTBR register, clear the generated low-speed time base
counter interrupt request bit (the QLTBCn bit of the IRQ67 register) to "0". (n = 0 to 2)
Figure 7-4 shows a sample program for initializing the LTBR register.
Figure 7-4 Sample Program for Initializing LTBR Register
The time equivalent to one clock of the system clock is required for QLTBCn to become "1" after writing to the LTBR
register. Therefore, place one NOP instruction after writing to the LTBR register.
ELTBC0 = 0;
// Disable LTBC0 interrupt
ELTBC1 = 0;
// Disable LTBC1 interrupt
ELTBC2 = 0;
// Disable LTBC2 interrupt
LTBINT = 0x0741;
// Change assignment of interrupt signal
__asm("NOP");
// Waiting time
QLTBC0 = 0;
// Clear QLTBC0
QLTBC1 = 0;
// Clear QLTBC1
QLTBC2 = 0;
// Clear QLTBC2
ELTBC0 = 1;
// Enable LTBC0 interrupt
ELTBC1 = 1;
// Enable LTBC1 interrupt
ELTBC2 = 1;
// Enable LTBC2 interrupt
__DI();
// Disable interrupt (MIE=0)
LTBR = 0x00;
// Reset LTBR
__asm("NOP");
// Waiting time
QLTBC0 = 0;
// Clear QLTBC0
QLTBC1 = 0;
// Clear QLTBC1
QLTBC2 = 0;
// Clear QLTBC2
__EI();
// Enable interrupt (MIE=1)
Содержание ML62Q1000 Series
Страница 17: ...Chapter 1 Overview...
Страница 112: ...Chapter 2 CPU and Memory Space...
Страница 154: ...Chapter 3 Reset Function...
Страница 166: ...Chapter 4 Power Management...
Страница 196: ...Chapter 5 Interrupts...
Страница 248: ...Chapter 6 Clock generation Circuit...
Страница 274: ...Chapter 7 Low Speed Time Base Counter...
Страница 291: ...Chapter 8 16 Bit Timer...
Страница 320: ...Chapter 9 Functional Timer FTM...
Страница 382: ...Chapter 10 Watchdog Timer...
Страница 402: ...Chapter 11 Serial Communication Unit...
Страница 456: ...Chapter 12 I2 C Bus Unit...
Страница 491: ...Chapter 13 I2 C Master...
Страница 512: ...Chapter 14 DMA Controller...
Страница 531: ...Chapter 15 Buzzer...
Страница 550: ...Chapter 16 Simplified RTC...
Страница 559: ...Chapter 17 GPIO...
Страница 594: ...Chapter 18 External Interrupt Function...
Страница 612: ...Chapter 19 CRC Generator...
Страница 632: ...Chapter 20 Analog Comparator...
Страница 644: ...Chapter 21 D A Converter...
Страница 655: ...Chapter 22 Voltage Level Supervisor...
Страница 676: ...Chapter 23 Successive Approximation Type A D Converter...
Страница 709: ...Chapter 24 Regulator...
Страница 714: ...Chapter 25 Flash Memory...
Страница 743: ...Chapter 26 Code Option...
Страница 750: ...Chapter 27 LCD Driver...
Страница 788: ...Chapter 28 On Chip Debug Function...
Страница 795: ...Chapter 29 Safety Function...
Страница 813: ...Appendix A...
Страница 881: ...Revision History...