
ML62Q1000 Series User's Manual
Chapter 9 Functional Timer (FTM)
FEUL62Q1000
9-56
9.3.7.2 Start/Stop Operations by Event Trigger
Here is the setting used to control the counter by event triggers.
First, before controlling the counter, set the following configuration by FTnTRG0 and FTnTRG1 registers.
Choose "no division" as the timer clock.
If using HSCLK as the system clock, write "1" to the FTnCK0 bit of the FTnCLK register, and "000" to FTnCKD2 to
FTnCKD0 bits.
Setting the FTnTRG0 register
- Enable/disable counter start/stop with event triggers
- Clear/not clear the counter when starting/stopping with event triggers
- Accept/not accept the next counter start after stopping with event triggers
- Accept/not accept the counter clear if the Positive phase output is "H" level when clearing the counter with event
triggers.
- Event trigger source (EXTRG0 to EXTRG7, TMH0TRG to TMH5TRG, FTMnTRG, CMP0D)
Setting the FTnTRG1 register
The edge/level of the event trigger causing counter start
The edge/level of the event trigger causing counter stop
Setting the timer clock used
Choose the timer clock in the FTnCLK register.
(Even if not changing the setting, choose the timer clock again.)
Once the configuration above is completed, control the counter by the FTCSTR register. The procedure is as follows:
(1)
Make the waiting state for an event trigger
Write "1" to the FTnETG bit to make the waiting state for an event trigger (if the level setting is applied for
trigger start and the level is applicable, the counter operation is started as soon as the FTnTGEN bit of the
FTCSTAT register becomes "1".)
(2)
Start the timer counting by the software
If writing "1" to the FTnETG bit, and writing "1" to the FTnSTR bit with the trigger operation enabled, the
timer counting is started by the software.
If writing "0" to the FTnSTP bit of the FTCSTP register while counter operation is in progress, the timer
counting is stopped by the software.
If EXTRG0 to EXTRG7 and CMP0D are chosen as the event trigger source, input the signal with the noise removal
width set in FTnTRF2 to FTnTRF0 bits of the FTnTRG1 register or longer. Even when the noise filter is disabled in
FTnTRF2 to FTnTRF0 bits, pulse of one clock or less may sometimes be removed, sometimes not.
Figure 9-16 shows the sampling timing for the external input.
Figure 9-16 Sampling Timing for the External Input
Counting clock
External input pin
Sampling clock
Waveform after removing
FTMn accepts the external input
Содержание 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...