|
|
@@ -27,7 +27,7 @@ Description of the PCNT functionality is divided into the following sections:
|
|
|
- :ref:`pcnt-watch-points` - describes how to configure PCNT watch points (i.e., tell PCNT unit to trigger an event when the count reaches a certain value).
|
|
|
- :ref:`pcnt-register-event-callbacks` - describes how to hook your specific code to the watch point event callback function.
|
|
|
- :ref:`pcnt-set-glitch-filter` - describes how to enable and set the timing parameters for the internal glitch filter.
|
|
|
- :SOC_PCNT_SUPPORT_CLEAR_SIGNAL: - :ref:`pcnt-set-clear-signal` - describes how to set the parameters for the zero signal.
|
|
|
+ :SOC_PCNT_SUPPORT_CLEAR_SIGNAL: - :ref:`pcnt-set-clear-signal` - describes how to set the parameters for the external clear signal.
|
|
|
- :ref:`pcnt-enable-disable-unit` - describes how to enable and disable the PCNT unit.
|
|
|
- :ref:`pcnt-unit-io-control` - describes IO control functions of PCNT unit, like enable glitch filter, start and stop unit, get and clear count value.
|
|
|
- :ref:`pcnt-power-management` - describes what functionality will prevent the chip from going into low power mode.
|
|
|
@@ -205,16 +205,16 @@ This function should be called when the unit is in the init state. Otherwise, it
|
|
|
|
|
|
.. _pcnt-set-clear-signal:
|
|
|
|
|
|
- Set Clear Signal
|
|
|
- ^^^^^^^^^^^^^^^^
|
|
|
+ Use External Clear Signal
|
|
|
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
- The PCNT unit can receive a zero signal from the GPIO. The parameters that can be configured for the zero signal are listed in :cpp:type:`pcnt_clear_signal_config_t`:
|
|
|
+ The PCNT unit can receive a clear signal from the GPIO. The parameters that can be configured for the clear signal are listed in :cpp:type:`pcnt_clear_signal_config_t`:
|
|
|
|
|
|
- - :cpp:member:`pcnt_clear_signal_config_t::zero_input_gpio_num` specify the GPIO numbers used by **zero** signal. The default active level is high, and the input mode is pull-down enabled.
|
|
|
- - :cpp:member:`pcnt_clear_signal_config_t::invert_zero_input` is used to decide whether to invert the input signal before it going into PCNT hardware. The invert is done by GPIO matrix instead of PCNT hardware. The input mode is pull-up enabled when the input signal is invert.
|
|
|
- - :cpp:member:`pcnt_clear_signal_config_t::io_loop_back` is for debug only, which enables both the GPIO's input and output paths. This can help to simulate the zreo pulse signals by function :cpp:func:`gpio_set_level` on the same GPIO.
|
|
|
+ - :cpp:member:`pcnt_clear_signal_config_t::clear_signal_gpio_num` specify the GPIO numbers used by **clear** signal. The default active level is high, and the input mode is pull-down enabled.
|
|
|
+ - :cpp:member:`pcnt_clear_signal_config_t::invert_clear_signal` is used to decide whether to invert the input signal before it going into PCNT hardware. The invert is done by GPIO matrix instead of PCNT hardware. The input mode is pull-up enabled when the input signal is inverted.
|
|
|
+ - :cpp:member:`pcnt_clear_signal_config_t::io_loop_back` is for debug only, which enables both the GPIO's input and output paths. This can help to simulate the clear signal by function :cpp:func:`gpio_set_level` for the same GPIO.
|
|
|
|
|
|
- This signal acts in the same way as calling :cpp:func:`pcnt_unit_clear_count`, but is not subject to software latency, and is suitable for use in situations with high latency requirements.
|
|
|
+ This signal acts in the same way as calling :cpp:func:`pcnt_unit_clear_count`, but is not subject to software latency, and is suitable for use in situations with low latency requirements. Also please note, the flip frequency of this signal can not be too high.
|
|
|
|
|
|
.. code:: c
|
|
|
|