BAT32G1x9 user manual | Chapter 8 Timer B
294 / 1149
Rev.1.02
8.6
Considerations when using timer B
8.6.1 Phase difference, overlap, and pulse width in phase count mode
The phase difference and overlap of the external input signals on the TBCLK0 pin and TBCLK1 pin must
be at least 1.5 f
CLK
and a pulse width of at least 2.5 f
CLK
, respectively. The phase difference, overlap, and
pulse width in phase count mode are shown in Figure 8-32.
Figure 8-32 Phase difference, overlap, and pulse width in Phase Counting mode
TBCLK1 input
TBCLK0 input
phase difference, overlap: at least 1.5 fCLK
pulse width: At least 2.5 fCLK
pulse
width
pulse
width
phase
difference
phase
difference
overlap
overlap
8.6.2 Switching modes
•
To switch modes during operation, it must be done after the TBSTART position of the TBMR register is
"0" (stop counting).
•
The bit0 of the IF1D register must be set to "0" after switching
modes and before starting running. For details, please refer to
"Chapter 25 Interrupt Functions".
8.6.3 Count the switching of the source
•
To switch the counting source, you must switch
the note after stopping counting. Change steps
(1) Place the TBSTART position of the TBBR register "0" (stop count).
(2) Change the TBTCK0~TBTCK2 bit of the TBCR register.
Note The registers and bits that are forbidden to be overwritten during the counting process are as follows:
•
All bits except the TBSTART bit of the TBMR register
•
TBCNTC registers
•
TBCR registers
•
TBIOR registers