17.8
Precautions when Using 16-bit PPG Timer
Shown below are the precautions that must be followed when using the 16-bit PPG
timer.
Precautions when Using 16-bit PPG Timer
Precautions when setting the program
Do not use the retrigger if the same values are set for the cycle and duty. If used, the PPG output will go to
the "L" level for one count clock cycle after the retrigger, and then go back to the "H" level when normal
polarity has been selected.
If the microcontroller enters a standby mode, the TRG pin setting may change and cause the device to
malfunction. Therefore, disable the timer enable bit (PCNTH0:CNTE = "0") or disable the hardware trigger
enable bit (PCNTL0:EGS1, EGS0 = "00").
When the cycle and duty are set to the same value, an interrupt is generated only once by duty match.
Moreover, if the duty is set to a value greater than the value of the period, no interrupt will be generated by
duty match.
Do not disable the timer enable bit (PCNTH0: CNTE = 0) and software trigger (PCNTH0: STRG =1) at the
same time when retrigger by the software is enabled (PCNTH0: RTRG =1) and the retrigger is selected as
an interrupt type (PCNTL0: IRS1, IRS0 = 00) during count operation. If it occurs, interrupt flag bit may set
by retrigger although timer stops.
CHAPTER 17 16-BIT PPG TIMER
297