Commit Graph

9 Commits

Author SHA1 Message Date
morris
dabfc7fc4b fix(ana_cmpr): correct swapped POS/NEG interrupt masks on ESP32-H21
Align H21 pos/neg cross interrupt bits with other targets and skip the
driver on the Linux simulator.
2026-09-18 14:12:06 +08:00
wuzhenghui
c7de92feda change(hal): rename PLL_F80M to REF_80M for esp32s31 peripherals clock defination 2026-07-22 16:32:13 +08:00
Tiago Medicci
cb7b9850c8 fix(ana_cmpr): Fix swapped POS/NEG cross interrupt masks on ESP32-C5/P4/C61
In components/soc/esp32c5/register/soc/gpio_ext_struct.h (ESP32-C5),
components/soc/esp32c61/register/soc/gpio_ext_struct.h (ESP32-C61),
and components/soc/esp32p4/register/hw_ver3/soc/gpio_struct.h
(ESP32-P4), the analog comparator raw/status/enable/clear register
fields are named comp_neg_0_*/comp0_neg_* for bit 0 and
comp_pos_0_*/comp0_pos_* for bit 1, but each field's own comment says
the opposite: bit 0 is documented as "analog comparator pos edge
interrupt raw/status/enable/clear" and bit 1 as the "neg" counterpart.
The LL masks were defined from the field names rather than from this
documented behavior, so ANALOG_CMPR_LL_POS_CROSS_INTR_MASK() ended up
selecting bit 1 and ANALOG_CMPR_LL_NEG_CROSS_INTR_MASK() bit 0.

A new test case, added in the following commit, arms only one cross
direction at a time and checks that a matching transition fires the
callback while the opposite, never-armed direction does not; without
this fix it reproducibly fails on ESP32-C5, ESP32-P4, and ESP32-C61.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-07-15 14:46:57 -03:00
morris
2b9b065c82 feat(ana_cmpr): enable ana_cmpr driver support on esp32h4 2026-05-21 10:30:43 +08:00
morris
47863cb651 feat(ana_cmpr): support multi-channel scan on esp32s31 2026-05-06 09:39:48 +08:00
morris
45d2c0c486 feat(ana_cmpr): refactor driver implemnetation for new ip
esp32h4 and esp32s31 has a new IP design WRT the ana cmpr module
2026-04-19 21:47:30 +08:00
morris
e258c7c981 feat(ana_cmpr): added low level functions for esp32h4 and esp32s31 2026-04-14 09:59:11 +08:00
morris
9cad94e697 feat(ana_cmpr): support analog comparator on esp32h21 2026-03-23 10:28:29 +08:00
laokaiyao
79d6e573e6 feat(hal): graudate the ana_cmpr hal driver into a new component 2025-12-04 10:34:57 +08:00