
ML62Q1000 Series User's Manual
Chapter 9 Functional Timer (FTM)
FEUL62Q1000
9-44
9.3.4 CAPTURE Mode Operation
The CAPTURE mode stores the count value, which was obtained when an event trigger source was generated, in the
FTnEA or FTnEB register.
The event trigger source for the capture is common to that used for counter start/stop.
Stored data in FTnEA register
Count value at the time when an event trigger rising edge is generated
Stored data in FTnEB register
Count value at the time when an event trigger falling edge is generated
9.3.4.1 Operation Example in CAPTURE Mode
The following example shows the operation of one cycle and duty of the PWM signal input from the P02/EXTRG0 pin
in the CAPTURE mode using the counter start/stop through trigger events.
Set each register in the following steps before measuring.
Step 1: Write "01" to the FTnMD1 and FTnMD0 bits of the FTnMOD register to choose the CAPTURE mode.
Step 2: When using an interrupt, write "1" to the FTnIETS bit of the FTnINTE register to enable
the trigger counter stop interrupt.
Step 3: Write "0" to the FTnSTSS bit of the FTnTRG0 register, "0000" to FTnSTS3 to FTnSTS0 bits to set
the source of the trigger event to "EXTRG0".
Write "1" to the FTnST bit to enable the start function of the counter.
Write "1" to the FTnSP bit to enable the stop function of the counter.
Step 4: Write "000" to FTnTRM2 to FTnTRM0 bits of the FTnTRG1 register to choose
the trigger through the rising edge for both of counter start/stop.
Step 5: Write "1" to the FTnETG bit of the FTCSTR register to enable the trigger operation of capturing.
Figure 9-6 shows the time chart in this example.
Figure 9-6 Operation Example to measure cycle and duty of PWM signal (one 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.
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.
Capture data
P02/EXTRG0
(1)
Undefined
Counter
FTnC
FTnEA
Capture data
Undefined
FTnEB
Retain value at stop
(2)
(3)
Interrupt
Summary of Contents for ML62Q1000 Series
Page 17: ...Chapter 1 Overview...
Page 112: ...Chapter 2 CPU and Memory Space...
Page 154: ...Chapter 3 Reset Function...
Page 166: ...Chapter 4 Power Management...
Page 196: ...Chapter 5 Interrupts...
Page 248: ...Chapter 6 Clock generation Circuit...
Page 274: ...Chapter 7 Low Speed Time Base Counter...
Page 291: ...Chapter 8 16 Bit Timer...
Page 320: ...Chapter 9 Functional Timer FTM...
Page 382: ...Chapter 10 Watchdog Timer...
Page 402: ...Chapter 11 Serial Communication Unit...
Page 456: ...Chapter 12 I2 C Bus Unit...
Page 491: ...Chapter 13 I2 C Master...
Page 512: ...Chapter 14 DMA Controller...
Page 531: ...Chapter 15 Buzzer...
Page 550: ...Chapter 16 Simplified RTC...
Page 559: ...Chapter 17 GPIO...
Page 594: ...Chapter 18 External Interrupt Function...
Page 612: ...Chapter 19 CRC Generator...
Page 632: ...Chapter 20 Analog Comparator...
Page 644: ...Chapter 21 D A Converter...
Page 655: ...Chapter 22 Voltage Level Supervisor...
Page 676: ...Chapter 23 Successive Approximation Type A D Converter...
Page 709: ...Chapter 24 Regulator...
Page 714: ...Chapter 25 Flash Memory...
Page 743: ...Chapter 26 Code Option...
Page 750: ...Chapter 27 LCD Driver...
Page 788: ...Chapter 28 On Chip Debug Function...
Page 795: ...Chapter 29 Safety Function...
Page 813: ...Appendix A...
Page 881: ...Revision History...