16.3.3.1 Output Polarity
The output polarity of each PCA channel is individually selectable using the PCA0POL register. By default, all output channels are con-
figured to drive the PCA output signals (CEXn) with their internal polarity. When the CEXnPOL bit for a specific channel is set to 1, that
channel’s output signal will be inverted at the pin. All other properties of the channel are unaffected, and the inversion does not apply to
PCA input signals. Changes in the PCA0POL register take effect immediately at the associated output pin.
16.3.4 Edge-Triggered Capture Mode
In this mode, a valid transition on the CEXn pin causes the PCA to capture the value of the PCA counter/timer and load it into the
corresponding module's 16-bit capture/compare register (PCA0CPLn and PCA0CPHn). The CAPPn and CAPNn bits in the PCA0CPMn
register are used to select the type of transition that triggers the capture: low-to-high transition (positive edge), high-to-low transition
(negative edge), or either transition (positive or negative edge). When a capture occurs, the Capture/Compare Flag (CCFn) in
PCA0CN0 is set to logic 1. An interrupt request is generated if the CCFn interrupt for that module is enabled. The CCFn bit is not auto-
matically cleared by hardware when the CPU vectors to the interrupt service routine, and must be cleared by software. If both CAPPn
and CAPNn bits are set to logic 1, then the state of the port pin associated with CEXn can be read directly to determine whether a
rising-edge or falling-edge caused the capture.
CEXn
PCA0L
PCA0CPLn
PCA0H
PCA0CPHn
CAPPn
CAPNn
CCFn (Interrupt Flag)
PCA Clock
Capture
Figure 16.2. PCA Capture Mode Diagram
Note:
The CEXn input signal must remain high or low for at least 2 system clock cycles to be recognized by the hardware.
EFM8UB3 Reference Manual
Programmable Counter Array (PCA0)
silabs.com
| Building a more connected world.
Rev. 0.2 | 191