16.3.8.3 Comparator Clear Function
In 8/9/10/11/16-bit PWM modes, the comparator clear function utilizes the Comparator0 output synchronized to the system clock to
clear CEXn to logic low for the current PWM cycle. This comparator clear function can be enabled for each PWM channel by setting the
CPCEn bits to 1 in the PCA0CLR SFR. When the comparator clear function is disabled, CEXn is unaffected.
The asynchronous Comparator 0 output is logic high when the voltage of CP0+ is greater than CP0– and logic low when the voltage of
CP0+ is less than CP0–. The polarity of the Comparator 0 output is used to clear CEXn as follows: when CPCPOL = 0, CEXn is cleared
on the falling edge of the Comparator0 output.
CEXn (CPCEn = 0)
CEXn (CPCEn = 1)
Comparator0 Output
(CPCPOL = 0)
Figure 16.12. CEXn with CPCEn = 1, CPCPOL = 0
When CPCPOL = 1, CEXn is cleared on the rising edge of the Comparator0 output.
CEXn (CPCEn = 0)
CEXn (CPCEn = 1)
Comparator0 Output
(CPCPOL = 1)
Figure 16.13. CEXn with CPCEn = 1, CPCPOL = 1
In the PWM cycle following the current cycle, should the Comparator 0 output remain logic low when CPCPOL = 0 or logic high when
CPCPOL = 1, CEXn will continue to be cleared.
CEXn (CPCEn = 0)
CEXn (CPCEn = 1)
Comparator0 Output
(CPCPOL = 0)
Figure 16.14. CEXn with CPCEn = 1, CPCPOL = 0
EFM8UB3 Reference Manual
Programmable Counter Array (PCA0)
silabs.com
| Building a more connected world.
Rev. 0.2 | 200