Download Print this page

Espressif ESP32 Technical Reference Manual page 503

Hide thumbs Also See for ESP32:

Advertisement

17 Pulse Count Controller (PCNT)
the counter to 0.
PCNT_CNT_L_LIM_Un
• Two threshold values: Triggered when PULSE_CNT =
• Zero: Triggered when PULSE_CNT = 0.
17.2.4 Examples
Figure
17-2
shows channel 0 being used as an up-counter. The configuration of channel 0 is shown be-
low.
CNT_CH0_POS_MODE_Un
PCNT_CH0_NEG_MODE_Un
PCNT_CH0_LCTRL_MODE_Un
PCNT_CH0_HCTRL_MODE_Un
high.
PCNT_CNT_H_LIM_Un
Figure
17-3
shows channel 0 decrementing the counter. The configuration of channel 0 differs from that in
Figure
17-2
in the following two aspects:
PCNT_CH0_LCTRL_MODE_Un
crease, rather than increase, the counter.
PCNT_CNT_H_LIM_Un
17.2.5 Interrupts
PCNT_CNT_THR_EVENT_Un_INT: This interrupt gets triggered when one of the five channel comparators de-
tects a match.
Espressif Systems
should be a negative number.
Figure 17-2. PULSE_CNT Upcounting Diagram
= 1: increase counter on the rising edge of sig_ch0_un.
= 0: no counting on the falling edge of sig_ch0_un.
= 0: Do not modify counter mode when
= 2: Do not allow counter increments/decrements when
= 5: PULSE_CNT resets to 0 when the count value increases to 5.
Figure 17-3. PULSE_CNT Downcounting Diagram
= 1: invert counter mode when
= –5: PULSE_CNT resets to 0 when the count value decreases to –5.
Submit Documentation Feedback
PCNT_THR_THRES0_Un
ctrl_ch0_un
503
or PCNT_THR_THRES1_Un.
ctrl_ch0_un
is low.
ctrl_ch0_un
is at low level, so it will de-
ESP32 TRM (Version 5.2)
is

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?