
ML62Q1000 Series User's Manual
Chapter 9 Functional Timer (FTM)
FEUL62Q1000
9-45
This is an exmaple for measuring the cycle and duty of the PWM signal input from the P02/EXTRG0 pin by the
start/stop of a trigger event.
Configure registers as follows before the measurment.
Step 1: Choose the CAPTURE mode by writing "01" to FTnMD1 and FTnMD0 bits of FTnMOD register.
Step 2:
When using the interrupt, set FTnIEA bit of FTnINTE register to "1" to enable the event timing A
interrupt.
Step 3:
Set FTnSTSS bit of FTnTRG0 register to "0"and set FTnSTS3 to FTnSTS0 bits to "0000" to configure
the EXTRG0 as the trigger event source.
Set FTnST bit to "1" to enable the start function of the counter.
Set FTnSTC bit to "1" to enable the counter clear when the trigger event occurs.
Step 4: Set FTnTRM2 to FTnTRM0 bits of FTnTRG1 register to "000" to choose the rising edge as the trigger
for both the counter start and stop.
Step 5: Set FTnETG bit of FTCSTR register to "1" to enable the trigger operation.
Figure 9-7 shows the time chart in this example.
Figure 9-7 Operation Example to measure cycle and duty of PWM signal (repeat cycle)
(1)
The counter starts operating at the rising edge of the signal input from the P02/EXTRG0 pin.
(2)
The value of the counter register FTnC is stored into the FTnEB register at the falling edge of the P02/EXTRG0
pin.
(3)
The value of the counter register FTnC is stored into the FTnEA register at the rising edge of the P02/EXTRG0
pin. The counter stop the operation and the interrupt is generated.
(4)
The value of the counter register FTnC is stored into the FTnEB register at the falling edge of the P02/EXTRG0
pin.
(5)
The value of the counter register FTnC is stored into the FTnEA register at the rising edge of the P02/EXTRG0
pin. The counter stop the operation and the interrupt is generated.
(6)
The value of the counter register FTnC is stored into the FTnEA register at the rising edge of the P02/EXTRG0
pin. The counter stop the operation and the interrupt is generated.
The value of the FTnEA register corresponds to the cycle of the PWM signal input from the P02/EXTRG0 pin, and the
value of the FTnEB register corresponds to the duty.
Undefined
P02/EXTRG0
(1)
Capture data
Counter
FTnC
FTnEA
Capture data
Undefined
FTnEB
Capture data
Capture data
(2)
(3)
(4)
(5)
Interrupt
Содержание 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...