mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-03 19:41:55 +02:00
feat(ana_cmpr): supported analog comparator on esp32p4
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
Analog Comparator
|
||||
=================
|
||||
|
||||
{IDF_TARGET_ANA_CMPR_NUM: default="NOT UPDATED", esp32h2="one"}
|
||||
{IDF_TARGET_ANA_CMPR_SRC_CHAN: default="NOT UPDATED", esp32h2="GPIO11"}
|
||||
{IDF_TARGET_ANA_CMPR_EXT_REF_CHAN: default="NOT UPDATED", esp32h2="GPIO10"}
|
||||
{IDF_TARGET_ANA_CMPR_NUM: default="NOT UPDATED", esp32h2="one", esp32p4="two"}
|
||||
{IDF_TARGET_ANA_CMPR_SRC_CHAN0: default="NOT UPDATED", esp32h2="GPIO11", esp32p4="GPIO52"}
|
||||
{IDF_TARGET_ANA_CMPR_EXT_REF_CHAN0: default="NOT UPDATED", esp32h2="GPIO10", esp32p4="GPIO51"}
|
||||
{IDF_TARGET_ANA_CMPR_SRC_CHAN1: default="NOT UPDATED", esp32p4="GPIO54"}
|
||||
{IDF_TARGET_ANA_CMPR_EXT_REF_CHAN1: default="NOT UPDATED", esp32p4="GPIO53"}
|
||||
|
||||
Introduction
|
||||
------------
|
||||
@@ -16,10 +18,18 @@ Analog Comparator on {IDF_TARGET_NAME} has {IDF_TARGET_ANA_CMPR_NUM} unit(s), th
|
||||
|
||||
**UNIT0**
|
||||
|
||||
- Source Channel: {IDF_TARGET_ANA_CMPR_SRC_CHAN}
|
||||
- External Reference Channel: {IDF_TARGET_ANA_CMPR_EXT_REF_CHAN}
|
||||
- Source Channel: {IDF_TARGET_ANA_CMPR_SRC_CHAN0}
|
||||
- External Reference Channel: {IDF_TARGET_ANA_CMPR_EXT_REF_CHAN0}
|
||||
- Internal Reference Channel: Range 0% ~ 70% VDD, step 10% VDD
|
||||
|
||||
.. only:: esp32p4
|
||||
|
||||
**UNIT1**
|
||||
|
||||
- Source Channel: {IDF_TARGET_ANA_CMPR_SRC_CHAN1}
|
||||
- External Reference Channel: {IDF_TARGET_ANA_CMPR_EXT_REF_CHAN1}
|
||||
- Internal Reference Channel: Range 0% ~ 70% VDD, step 10% VDD
|
||||
|
||||
Functional Overview
|
||||
-------------------
|
||||
|
||||
@@ -33,6 +43,10 @@ The following sections of this document cover the typical steps to install and o
|
||||
- `Thread Safety <#thread-safety>`__ - lists which APIs are guaranteed to be thread safe by the driver.
|
||||
- `Kconfig Options <#kconfig-options>`__ - lists the supported Kconfig options that can be used to make a different effect on driver behavior.
|
||||
|
||||
.. only:: SOC_ANA_CMPR_SUPPORT_ETM
|
||||
|
||||
- `ETM Events <#etm-events>`__ -
|
||||
|
||||
Resource Allocation
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -180,6 +194,13 @@ Kconfig Options
|
||||
- :ref:`CONFIG_ANA_CMPR_CTRL_FUNC_IN_IRAM` controls where to place the Analog Comparator control functions (IRAM or Flash), see `IRAM Safe <#iram-safe>`__ for more information.
|
||||
- :ref:`CONFIG_ANA_CMPR_ENABLE_DEBUG_LOG` is used to enabled the debug log output. Enabling this option increases the firmware binary size.
|
||||
|
||||
.. only:: SOC_ANA_CMPR_SUPPORT_ETM
|
||||
|
||||
ETM Events
|
||||
^^^^^^^^^^
|
||||
|
||||
To create an analog comparator cross event, you need to include ``driver/ana_cmpr_etm.h`` additionally, and allocate the event by :cpp:func:`ana_cmpr_new_etm_event`. You can refer to :doc:`GPTimer </api-reference/peripherals/etm>` for how to connect an event to a task.
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -71,6 +71,10 @@ Other Peripheral Events
|
||||
:SOC_GDMA_SUPPORT_ETM: - Refer to :doc:`/api-reference/system/async_memcpy` for how to get the ETM event handle from async memcpy.
|
||||
:SOC_MCPWM_SUPPORT_ETM: - Refer to :doc:`/api-reference/peripherals/mcpwm` for how to get the ETM event handle from MCPWM.
|
||||
|
||||
.. only:: esp32p4
|
||||
|
||||
:SOC_ANA_CMPR_SUPPORT_ETM: - Refer to :doc:`/api-reference/peripherals/ana_cmpr` for how to get the ETM event handle from analog comparator.
|
||||
|
||||
.. _etm-task:
|
||||
|
||||
ETM Task
|
||||
|
||||
Reference in New Issue
Block a user